une erreur lors de la compilation
Amougou22 opened this issue · 1 comments
{
"resource": "/c:/Lightning Web Components/HelloWorldLightningWebComponent/force-app/main/default/lwc/helloWord/helloWord.js",
"owner": "generated_diagnostic_collection_name#2",
"severity": 8,
"message": "LWC1007: c:\Lightning Web Components\HelloWorldLightningWebComponent\helloWord.js: Only one default export allowed per module. (8:0)",
"source": "lwc",
"startLineNumber": 8,
"startColumn": 1,
"endLineNumber": 8,
"endColumn": 2147483648
}
I have solved that issue by changing the access modifier of the listings() method from protected function listings (){
return $this->hasMany(Listing::class, 'user_id');
} to public function listings (){ return $this->hasMany (Listing::class, 'user_id'); } in the User Model.