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

[5.3] Update policy.stub #16981

Merged
merged 1 commit into from
Dec 27, 2016
Merged

[5.3] Update policy.stub #16981

merged 1 commit into from
Dec 27, 2016

Conversation

cracki
Copy link
Contributor

@cracki cracki commented Dec 26, 2016

fix doc block for namespaced model

fix doc block for name spaced model
@GrahamCampbell GrahamCampbell changed the title Update policy.stub [5.3] Update policy.stub Dec 26, 2016
@taylorotwell
Copy link
Member

This PR doesn't describe what is broken. So I have no idea what to verify.

@cracki
Copy link
Contributor Author

cracki commented Dec 26, 2016

when using console command to generate policy, if model get namespaced (Ex. Model\Post) , generated doc block must use same name spaced path

@taylorotwell
Copy link
Member

Please give me an exact Artisan command I can paste in my terminal to recreate the issue.

@cracki
Copy link
Contributor Author

cracki commented Dec 26, 2016

php artisan make:model Models\Mymodel
Model created successfully.

php artisan make:policy MymodelPolicy --model=Models\Mymodel
Policy created successfully.


generated doc block:

    /**
     * Determine whether the user can view the mymodel.
     *
     * @param  \App\User  $user
     * @param  \App\Mymodel  $mymodel
     * @return mixed
     */

this is correct:

     * @param  \App\Models\Mymodel  $mymodel

@taylorotwell taylorotwell merged commit 2a41914 into laravel:5.3 Dec 27, 2016
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