Open amrokhudair opened 6 years ago
I switched to Laravel 5.6 and it seems to run without errors. :)
Yes it does work. I am using it in my Laravel 5.6 project.
@ amrokhudair What error show you.
@anis-bedhiafi Did you run : php artisan entrust:migration ? I had a error: ReflectionException : Method Zizaco\Entrust\MigrationCommand::handle() does not exist
So I think entrust is not ready all for Laravel 5.6.
I fixed it by add the following code in class Zizaco\Entrust\MigrationCommand. and then, it work well public function handle() { $this->fire(); }
@terrywamg I had alot of problems with this package. I don't recommend it. Here is why:
https://laravel-news.com/two-best-roles-permissions-packages
https://github.com/spatie/laravel-permission https://github.com/JosephSilber/bouncer
I am using laravel-permission with v5.6. It is an awesome package. You should give it a try.
@anis-bedhiafi That article is pretty outdated, for example Bouncer allows syncing for roles and abilities, where in the article that was the main benefit of going with Spatie.
Does Laravel 5.6 use the auto-load features for this package or does the app.php file still need manually updated for the provider and alias?
@gbryant200 it is actually called auto discovery. Starting from v5.5 Laravel will lookup the provider for you. To answer your question, just require the package with composer. Laravel will do the rest.
I have troubles when using the instruction:
Entrust::routeNeedsRole('admin/advanced*', 'owner', Redirect::to('/home'));
InvalidArgumentException:
Attribute [filter] does not exist.
Cause:
Route filters have been deprecated in preference of middleware and was removed entirely with the release of Laravel 5.2 in December 2015
In laravel 5.5 withRole method? Is supported withRole method for v5.5 laravel?
@anis-bedhiafi i try laravel-permission it gave me a error "model_id cannot be null", when i assign a role to user and any help
@MaherSakka did you already solved it? I have the same problem too..
Hi. I want to ask if this package working in laravel 5.6 ? Thank you in advanced.