Skip to content

[7.x] Updated user model var name #32748

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

Merged
merged 1 commit into from
May 11, 2020

Conversation

innoflash
Copy link
Contributor

@innoflash innoflash commented May 11, 2020

This PR is just changing the variable name used in a policy.

Say i have App\Teacher set as user in the config/auth.php file.

When i create a policy like php artisan make:policy --model=Subject the policy methods are currently having $user as var name eg.

public function view(Teacher $user, Subject $subject){}

This PR changes the variable name to $teacher

public function view(Teacher $teacher, Subject $subject){}

@innoflash innoflash force-pushed the policy-user-model branch from 5f3aa7e to 0f948e6 Compare May 11, 2020 11:37
@taylorotwell taylorotwell merged commit d44ffde into laravel:7.x May 11, 2020
@innoflash innoflash deleted the policy-user-model branch May 11, 2020 14:36
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