Skip to content
New issue

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

Update Policy.php #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Olegkravec
Copy link

Pls, make updates for Laravel 8.0

Pls, make updates for Laravel 8.0
@malinbranduse
Copy link

malinbranduse commented Sep 30, 2020

Please merge this! Indeed it doesn't work on Laravel v8
@Olegkravec It works in Laravel v8, my issue was having moved my models to the App\Models which meant the db records would no longer match.

Fixed by adding this to my AppServicesProvider boot method:

Relation::morphMap([
    'App\User' => \App\Models\User::class,
    // Rest of the models you have in the db
]);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants