In the above both models i commented the method itemDestribution() but still it is working
相关问题
- Laravel Option Select - Default Issue
- Laravel 5.1 MethodNotAllowedHttpException on store
- Laravel - Implicit route model binding with soft d
- laravel : php artisan suddenly stop working
- How to execute MYSQL query in laravel?
相关文章
- laravel create model from custom stub when using p
- send redirect and setting cookie, using laravel 5
- How to send parameters to queues?
- Bcrypt vs Hash in laravel
- Laravel: What's the advantage of using the ass
- How to make public folder as root in Laravel?
- Input file in laravel 5.2?
- What is the difference between Session::set and Se
This relation displays a Data because of following reasons.
In your
ItemDestributionModel
, You have set relation withUserModel
andItemModel
both.In your
ItemModel
andUserModel
you haven't declare any public function and add Relation Class.When you call
UserModel
it will findhasMany
Relationship inItemDestributionModel
anduser()
function is available withbelongsTo
relationship.That's why laravel fetch data without declaring public function. But you should declare relationship inside public function. :)