Skip to content

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

Merged
taylorotwell merged 1 commit intolaravel:7.xfrom
innoflash:policy-user-model
May 11, 2020
Merged

[7.x] Updated user model var name#32748
taylorotwell merged 1 commit intolaravel:7.xfrom
innoflash:policy-user-model

Conversation

@innoflash
Copy link
Copy Markdown
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