Support the ongoing development of Laravel.io →
Database Eloquent Blade
Last updated 1 year ago.
0

Anybody have an y suggestions?

Last updated 1 year ago.
0

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.

Last updated 1 year ago.
0

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.

Last updated 1 year ago.
0

it doesn't have to be... eloquent relationship is confusing but its awesome.

did you installed debugbar? its gonna help you debug almost everything.

Last updated 1 year ago.
0

I tried to but I cant' get it to show anything.

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.