You server might be case sensitive. Try User
[l4.2] Relationships Lost on Deployment
I am looking for ANY ideas here ...
[Disclaimer] I am well aware that GoDaddy is NOT a great platform for Laravel deployment but I have NO CHOICE. I do have SSH access and installed Composer.
I cloned a local project to a GoDaddy Shared Linux server and ran 'composer install', 'bower install', 'dump-autoload' and migrated and seeded the database.
Locally running on MAMP PRO, everything works fine but on the server, when I switch the commented sections, I get 'Symfony \ Component \ Debug \ Exception \ FatalErrorException (E_ERROR), Class 'user' not found'
It seems to me like I lost the relationships I have declared in my models.
I really don't know how to debug and/or solve this.
public function index()
{
$loans = Loan::all();
return $loans;
/*
$loans = Loan::with('applicants.entitytype', 'committee.user', 'corporations','comments.status', 'distributor', 'farmer', 'farms.county', 'financials', 'insurance', 'loancrop.crop', 'loanstatus', 'loantype.reqdocs', 'location', 'partners', 'regions', 'ventures', 'user')->where('applicant_id', '!=', 'null')->get();
return $this->respond([
'data' => $this->loanTransformer->transformCollection($loans->all())
]);
*/
}
Please or to participate in this conversation.