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

fix: variables in stubs #18

Merged
merged 2 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Commands/LaravelAuthorizerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public function getNamespace(): string
/**
* Get the class name for the policy.
*
* @param string $name The name of the policy
* @param string $name The name of the policy
*/
public function getClassName(string $name): string
{
Expand All @@ -177,7 +177,7 @@ public function getClassName(string $name): string
/**
* Get the namespace for the model.
*
* @param string $model The name of the model
* @param string $model The name of the model
*/
public function getNamespacedModel(string $model): string
{
Expand Down
4 changes: 2 additions & 2 deletions src/Commands/stubs/policy.user.stub
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ class {{ class }}
* @param {{ model }} $model
* @return Response|bool
*/
public function view({{ user }} $user, {{ userModel }} $model): bool
public function view({{ user }} $user, {{ model }} $model): bool
{
return $user->can('view {{ modelSingularLowerCase }}', $model)
return $user->can('view {{ modelSingularLowerCase }}', $model);
}

/**
Expand Down