entrust icon indicating copy to clipboard operation
entrust copied to clipboard

Does this package working in 5.6 version ?

Open amrokhudair opened this issue 7 years ago • 12 comments

Hi. I want to ask if this package working in laravel 5.6 ? Thank you in advanced.

amrokhudair avatar Feb 25 '18 13:02 amrokhudair

I switched to Laravel 5.6 and it seems to run without errors. :)

v1r0x avatar Mar 01 '18 14:03 v1r0x

Yes it does work. I am using it in my Laravel 5.6 project.

anis-bedhiafi avatar Mar 01 '18 19:03 anis-bedhiafi

@ amrokhudair What error show you.

MaungC avatar Mar 06 '18 06:03 MaungC

@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(); }

jianhuawang avatar Mar 11 '18 14:03 jianhuawang

@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 avatar Mar 12 '18 13:03 anis-bedhiafi

@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.

1e4 avatar Mar 15 '18 10:03 1e4

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 avatar Mar 23 '18 13:03 gbryant200

@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.

anis-bedhiafi avatar Mar 23 '18 20:03 anis-bedhiafi

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

MaherSakka avatar Aug 07 '18 21:08 MaherSakka

In laravel 5.5 withRole method? Is supported withRole method for v5.5 laravel?

salamat1307 avatar Sep 08 '18 07:09 salamat1307

@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

musman92 avatar Sep 11 '18 15:09 musman92

@MaherSakka did you already solved it? I have the same problem too..

anonymouse703 avatar Oct 15 '18 02:10 anonymouse703