We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Model User https://github.com/slava-pleshkov/laravel-slavapleshkov/blob/master/app/User.php Model Role https://github.com/slava-pleshkov/laravel-slavapleshkov/blob/master/app/Role.php Controllers User https://github.com/slava-pleshkov/laravelslavapleshkov/blob/master/app/Http/Controllers/Admin/UserController.php View https://github.com/slava-pleshkov/laravel-slavapleshkov/blob/master/resources/views/admin/users/index.blade.php Does not show in view. Prompt me how I must decide a problem
The text was updated successfully, but these errors were encountered:
The problem was solved.
Sorry, something went wrong.
Please post your solutions. Thanks.
Model User
public function role() { return $this->belongsTo('App\Role'); }
Model Role
public function users() { return $this->hasMany('App\User'); }
Controllers User
public function index() { $main = User::all(); return view('admin.users.index', compact('main')); }
View {{ $item->role->name }}
{{ $item->role->name }}
No branches or pull requests
Model User
https://github.com/slava-pleshkov/laravel-slavapleshkov/blob/master/app/User.php
Model Role
https://github.com/slava-pleshkov/laravel-slavapleshkov/blob/master/app/Role.php
Controllers User
https://github.com/slava-pleshkov/laravelslavapleshkov/blob/master/app/Http/Controllers/Admin/UserController.php
View
https://github.com/slava-pleshkov/laravel-slavapleshkov/blob/master/resources/views/admin/users/index.blade.php
Does not show in view.
Prompt me how I must decide a problem
The text was updated successfully, but these errors were encountered: