Skip to content

Commit

Permalink
Fixed rules for stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
tabuna committed May 31, 2024
1 parent 8e58f59 commit b80f6bb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion stubs/app/Orchid/Screens/Role/RoleEditScreen.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class RoleEditScreen extends Screen
/**
* Fetch data to be displayed on the screen.
*
*
* @return array
*/
public function query(Role $role): iterable
Expand All @@ -52,6 +51,9 @@ public function description(): ?string
return 'Modify the privileges and permissions associated with a specific role.';
}

/**
* The permissions required to access this screen.
*/
public function permission(): ?iterable
{
return [
Expand Down Expand Up @@ -106,6 +108,7 @@ public function layout(): iterable
public function save(Request $request, Role $role)
{
$request->validate([
'role.name' => 'required',
'role.slug' => [
'required',
Rule::unique(Role::class, 'slug')->ignore($role),
Expand Down

0 comments on commit b80f6bb

Please sign in to comment.