Added @canany(['create', 'update'], $role) to resources/views/private/roles/_from.blade.php.

This commit is contained in:
Leonid Nikitin 2023-08-01 21:53:07 +06:00
parent 4083e2ec5e
commit dc6b6b0d42
Signed by: kor-elf
GPG Key ID: 7DE8F80C5CEC2C0D

View File

@ -2,4 +2,6 @@
<x-private.forms.input :title="__('validation.attributes.name')" name="name" type="text" :value="$role->name" required autofocus />
<x-private.forms.permissions_for_role :title="__('validation.attributes.permissions')" name="permissions[]" :value="$role->permissions->pluck('permission')->toArray()" :role="$role" />
<x-private.forms.input :title="__('validation.attributes.code')" name="code" type="text" :value="$role->code" :disabled="!empty($role->id)" required />
<button class="btn btn-primary" type="submit">{{ __('Save') }}</button>
@canany(['create', 'update'], $role)
<button class="btn btn-primary" type="submit">{{ __('Save') }}</button>
@endcanany