diff --git a/src-php/Role.php b/src-php/Role.php index d3c6e04..665499b 100644 --- a/src-php/Role.php +++ b/src-php/Role.php @@ -56,8 +56,9 @@ public function fields(Request $request) { return [ ID::make()->sortable(), + TextWithSlug::make(__('Name'), 'name')->sortable()->slug(__('Slug')), - Slug::make(__('Slug'), 'slug')->sortable(), + Slug::make(__('Slug'), 'slug')->rules('required', 'unique:roles')->sortable(), Checkboxes::make(__('Permissions'), 'permissions')->options(collect(Policy::all())->mapWithKeys(function ($policy) { return [