https://github.com/barryvdh/laravel-debugbar
public function status()
{
return $this->hasOne('RosterStatus', 'id', 'status_id');
}
i am not sure if code above gonna work but you should read the document and use debugbar to sql query.
k1ng440 said:
https://github.com/barryvdh/laravel-debugbar
public function status() { return $this->hasOne('RosterStatus', 'id', 'status_id'); }
I have attempted the above and have not be able to get it working. Are you sure I should be using hasOne as opposed to belongsTo?
i am not sure if code above gonna work but you should read the document and use debugbar to sql query.
it doesn't have to be... eloquent relationship is confusing but its awesome.
did you installed debugbar? its gonna help you debug almost everything.
I tried to but I cant' get it to show anything.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community