Skip to content

Commit

Permalink
[11.x] Fix: Ensure generated policies return boolean values (#53632)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aluisio-Pires authored Nov 25, 2024
1 parent 3f62f86 commit 77f104d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Illuminate/Foundation/Console/stubs/policy.stub
Original file line number Diff line number Diff line change
Expand Up @@ -13,54 +13,54 @@ class {{ class }}
*/
public function viewAny({{ user }} $user): bool
{
//
return false;
}

/**
* Determine whether the user can view the model.
*/
public function view({{ user }} $user, {{ model }} ${{ modelVariable }}): bool
{
//
return false;
}

/**
* Determine whether the user can create models.
*/
public function create({{ user }} $user): bool
{
//
return false;
}

/**
* Determine whether the user can update the model.
*/
public function update({{ user }} $user, {{ model }} ${{ modelVariable }}): bool
{
//
return false;
}

/**
* Determine whether the user can delete the model.
*/
public function delete({{ user }} $user, {{ model }} ${{ modelVariable }}): bool
{
//
return false;
}

/**
* Determine whether the user can restore the model.
*/
public function restore({{ user }} $user, {{ model }} ${{ modelVariable }}): bool
{
//
return false;
}

/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete({{ user }} $user, {{ model }} ${{ modelVariable }}): bool
{
//
return false;
}
}

0 comments on commit 77f104d

Please sign in to comment.