mirror of
https://github.com/filamentphp/filament.git
synced 2026-10-24 01:58:00 +08:00
lang refactoring
This commit is contained in:
+6
-6
@@ -66,7 +66,7 @@ return [
|
||||
'admin' => [
|
||||
|
||||
'dashboard' => [
|
||||
'label' => 'filament::admin.dashboard',
|
||||
'label' => 'Dashboard',
|
||||
'icon' => 'heroicons/heroicon-o-home', // path to SVG icon using Filament::icon() SVG icon helper
|
||||
'url' => 'filament.admin.dashboard', // string or named route
|
||||
'active' => 'filament.admin.dashboard', // string or named route (may also be an array @link https://github.com/dwightwatson/active)
|
||||
@@ -75,7 +75,7 @@ return [
|
||||
/* TODO
|
||||
|
||||
'globals' => [
|
||||
'label' => 'filament::admin.globals',
|
||||
'label' => 'Globals',
|
||||
'icon' => 'heroicons/heroicon-o-globe',
|
||||
'url' => 'filament.admin.globals.index',
|
||||
'active' => 'filament.admin.globals.*',
|
||||
@@ -83,7 +83,7 @@ return [
|
||||
],
|
||||
|
||||
'Resources' => [
|
||||
'label' => 'filament::admin.collections',
|
||||
'label' => 'Collections',
|
||||
'icon' => 'heroicons/heroicon-o-collection',
|
||||
'url' => 'filament.admin.collections.index',
|
||||
'active' => 'filament.admin.collections.*',
|
||||
@@ -93,7 +93,7 @@ return [
|
||||
*/
|
||||
|
||||
'users' => [
|
||||
'label' => 'filament::admin.users',
|
||||
'label' => 'Users',
|
||||
'icon' => 'heroicons/heroicon-o-user-group',
|
||||
'url' => 'filament.admin.users.index',
|
||||
'active' => 'filament.admin.users.*',
|
||||
@@ -101,7 +101,7 @@ return [
|
||||
],
|
||||
|
||||
'Roles' => [
|
||||
'label' => 'filament::admin.roles',
|
||||
'label' => 'Roles',
|
||||
'icon' => 'heroicons/heroicon-o-key',
|
||||
'url' => 'filament.admin.roles.index',
|
||||
'active' => 'filament.admin.roles.*',
|
||||
@@ -109,7 +109,7 @@ return [
|
||||
],
|
||||
|
||||
'Permissions' => [
|
||||
'label' => 'filament::admin.permissions',
|
||||
'label' => 'Permissions',
|
||||
'icon' => 'heroicons/heroicon-o-lock-closed',
|
||||
'url' => 'filament.admin.permissions.index',
|
||||
'active' => 'filament.admin.permissions.*',
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Admin Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used in the admin for various
|
||||
| messages and labels that we need to display to the user.
|
||||
|
|
||||
*/
|
||||
|
||||
'search' => 'Search',
|
||||
|
||||
'dashboard' => 'Dashboard',
|
||||
|
||||
'resources' => 'Resources',
|
||||
|
||||
'globals' => 'Globals',
|
||||
|
||||
'users' => 'Users',
|
||||
|
||||
'roles' => 'Roles',
|
||||
|
||||
'permissions' => 'Permissions',
|
||||
|
||||
'pagination_results' => 'Showing :firstItem to :lastItem out of :total results.',
|
||||
|
||||
];
|
||||
@@ -1,27 +0,0 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used during authentication for various
|
||||
| messages that we need to display to the user.
|
||||
|
|
||||
*/
|
||||
|
||||
'unauthenticated' => 'Unauthenticated.',
|
||||
|
||||
'sign_in' => 'Please sign in.',
|
||||
|
||||
'login' => 'Sign in to :name',
|
||||
|
||||
'signed_in_as' => 'Signed in as',
|
||||
|
||||
'logged_in' => 'Welcome <b>:name</b>! You have been logged in successfully.',
|
||||
|
||||
'logout' => 'You have been logged out successfully.',
|
||||
|
||||
];
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Confirmations Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used in the admin for confirmation
|
||||
| messages that we need to display to the user.
|
||||
|
|
||||
*/
|
||||
|
||||
'delete' => 'Are you sure you want to delete “:item”? This action cannot be undone.',
|
||||
|
||||
];
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| File field Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used in the admin for the file field
|
||||
| messages and labels that we need to display to the user.
|
||||
|
|
||||
*/
|
||||
|
||||
'delete' => 'Delete :file',
|
||||
|
||||
'upload' => 'Upload :file',
|
||||
];
|
||||
@@ -4,22 +4,14 @@ return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Fields Language Lines
|
||||
| Labels Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used in the admin for field
|
||||
| messages and labels that we need to display to the user.
|
||||
| The following language lines are used in the admin for misc. labels
|
||||
| that we need to display to the user.
|
||||
|
|
||||
*/
|
||||
|
||||
'file' => [
|
||||
|
||||
'upload' => 'Upload :item',
|
||||
|
||||
'uploading' => 'Uploading...',
|
||||
|
||||
],
|
||||
|
||||
'created_at' => 'Created',
|
||||
|
||||
'updated_at' => 'Last updated',
|
||||
@@ -8,10 +8,14 @@ return [
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used in the admin for notification
|
||||
| messages that we need to display to the user.
|
||||
| confirmations and messages that we need to display to the user.
|
||||
|
|
||||
*/
|
||||
|
||||
'logged_in' => 'Welcome <b>:name</b>!',
|
||||
|
||||
'logged_out' => '<b>:name</b>, you have been successfully signed out.',
|
||||
|
||||
'created' => '<strong>:item</strong> created successfully.',
|
||||
|
||||
'updated' => '<strong>:item</strong> updated successfully.',
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Pagination Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
*/
|
||||
|
||||
'results' => 'Showing :firstItem to :lastItem out of :total results.',
|
||||
|
||||
];
|
||||
@@ -12,36 +12,14 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'super_admin' => 'super admin',
|
||||
|
||||
'super_admin_info' => 'Super admins supersede all assigned roles and permissions.',
|
||||
'create' => 'New Permission',
|
||||
|
||||
'roles' => [
|
||||
'edit' => 'Edit Permission',
|
||||
|
||||
'create' => 'New Role',
|
||||
'delete' => 'Delete Permission',
|
||||
|
||||
'edit' => 'Edit Role',
|
||||
'direct_permissions' => 'Direct Permissions',
|
||||
|
||||
'delete' => 'Delete Role',
|
||||
|
||||
'delete_confirm' => 'Are you sure you want to delete the :name role? This action cannot be undone.',
|
||||
|
||||
],
|
||||
|
||||
'permissions' => [
|
||||
|
||||
'create' => 'New Permission',
|
||||
|
||||
'edit' => 'Edit Permission',
|
||||
|
||||
'delete' => 'Delete Permission',
|
||||
|
||||
'delete_confirm' => 'Are you sure you want to delete the :name permission? This action cannot be undone.',
|
||||
|
||||
'direct_permissions' => 'Direct Permissions',
|
||||
|
||||
'permissions_from_roles' => 'Permissions are inherited from assigned roles. You may add direct permissions as needed.',
|
||||
|
||||
],
|
||||
'permissions_from_roles' => 'Permissions are inherited from assigned roles. You may add direct permissions as needed.',
|
||||
|
||||
];
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Roles Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used for user specific
|
||||
| messages that we need to display to the user.
|
||||
|
|
||||
*/
|
||||
|
||||
'create' => 'New Role',
|
||||
|
||||
'edit' => 'Edit Role',
|
||||
|
||||
'delete' => 'Delete Role',
|
||||
|
||||
];
|
||||
@@ -11,22 +11,11 @@ return [
|
||||
| messages that we need to display to the user.
|
||||
|
|
||||
*/
|
||||
|
||||
|
||||
'super_admin' => 'super admin',
|
||||
|
||||
'name' => 'Name',
|
||||
|
||||
'avatar' => 'Avatar',
|
||||
|
||||
'new_password' => 'New password',
|
||||
|
||||
'new_password_confirmation' => 'Confirm new password',
|
||||
|
||||
'settings' => 'Account settings',
|
||||
|
||||
'last_login_at' => 'Last login',
|
||||
|
||||
'last_login_never' => 'never',
|
||||
|
||||
'last_login_ip' => 'Last login IP',
|
||||
'super_admin_info' => 'Super admins supersede all assigned roles and permissions.',
|
||||
|
||||
'create' => 'New User',
|
||||
|
||||
@@ -34,6 +23,4 @@ return [
|
||||
|
||||
'delete' => 'Delete User',
|
||||
|
||||
'delete_confirm' => 'Are you sure you want to delete :name? This action cannot be undone.',
|
||||
|
||||
];
|
||||
@@ -15,7 +15,7 @@ class DummyFieldset implements Fieldset
|
||||
public static function fields($model): array
|
||||
{
|
||||
return [
|
||||
Field::make('Name')
|
||||
Field::make('name')
|
||||
->input()
|
||||
->rules(['required', 'string', 'max:255']),
|
||||
];
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<span
|
||||
class="btn btn-file-input"
|
||||
:class="{ 'btn-is-disabled': {{ $disabled ? 'true' : 'false' }} }"
|
||||
x-text="isLoading() ? '{{ __('filament::fields.file.uploading') }}' : '{{ $field->placeholder ?? __('filament::fields.file.upload', ['item' => Str::singular($field->name)]) }}'"
|
||||
x-text="isLoading() ? '{{ __('Uploading') }}' : '{{ $field->placeholder ?? __('filament::fields/file.upload', ['file' => Str::singular($field->name)]) }}'"
|
||||
></span>
|
||||
</label>
|
||||
<div class="flex-shrink-0" x-show="isLoading()">
|
||||
@@ -80,7 +80,7 @@
|
||||
class="flex-shrink-0 flex items-center p-2"
|
||||
>
|
||||
<x-heroicon-o-x class="h-4 w-4 text-red-500" />
|
||||
<span class="sr-only">{{ __('filament::admin.remove', ['item' => $value['name']]) }}</span>
|
||||
<span class="sr-only">{{ __('filament::fields/file.delete', ['file' => $value['name']]) }}</span>
|
||||
</button>
|
||||
</li>
|
||||
@endforeach
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</h3>
|
||||
<div class="mt-2">
|
||||
<p class="text-sm leading-5 text-gray-500 dark:text-gray-400">
|
||||
{{ $message }}
|
||||
{{ __('filament::confirmations.delete', ['item' => $item]) }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
class="btn btn-small btn-add"
|
||||
>
|
||||
<x-heroicon-o-plus class="h-3 w-3 mr-2" />
|
||||
{{ __('filament::permissions.permissions.create') }}
|
||||
{{ __('filament::permissions.create') }}
|
||||
</button>
|
||||
@push('footer')
|
||||
<x-filament-modal
|
||||
id="permission-create"
|
||||
:label="__('filament::permissions.permissions.create')"
|
||||
:label="__('filament::permissions.create')"
|
||||
:esc-close="true"
|
||||
:click-outside="true"
|
||||
class="sm:max-w-xl"
|
||||
@@ -32,7 +32,7 @@
|
||||
type="search"
|
||||
wire:model="search"
|
||||
class="form-input input w-full"
|
||||
placeholder="{{ __('filament::admin.search') }}"
|
||||
placeholder="{{ __('Search') }}"
|
||||
>
|
||||
</div>
|
||||
<label class="flex-shrink-0 flex items-center">
|
||||
@@ -84,7 +84,7 @@
|
||||
<button class="flex" wire:click.prevent="sortBy('created_at')">
|
||||
@include('filament::partials.sort-header', [
|
||||
'field' => 'created_at',
|
||||
'label' => __('filament::fields.created_at'),
|
||||
'label' => __('filament::labels.created_at'),
|
||||
])
|
||||
</button>
|
||||
</th>
|
||||
@@ -92,7 +92,7 @@
|
||||
<button class="flex" wire:click.prevent="sortBy('updated_at')">
|
||||
@include('filament::partials.sort-header', [
|
||||
'field' => 'updated_at',
|
||||
'label' => __('filament::fields.updated_at'),
|
||||
'label' => __('filament::labels.updated_at'),
|
||||
])
|
||||
</button>
|
||||
</th>
|
||||
@@ -140,7 +140,7 @@
|
||||
{{ $permissions->links('filament::partials.pagination') }}
|
||||
@if (count($permissions))
|
||||
<p class="text-xs font-mono leading-5 text-gray-500 dark:text-gray-400">
|
||||
{{ __('filament::admin.pagination_results', [
|
||||
{{ __('filament::pagination.results', [
|
||||
'firstItem' => $permissions->firstItem(),
|
||||
'lastItem' => $permissions->lastItem(),
|
||||
'total' => $permissions->total(),
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
class="btn btn-small btn-add"
|
||||
>
|
||||
<x-heroicon-o-plus class="h-3 w-3 mr-2" />
|
||||
{{ __('filament::permissions.roles.create') }}
|
||||
{{ __('filament::roles.create') }}
|
||||
</button>
|
||||
@push('footer')
|
||||
<x-filament-modal
|
||||
id="role-create"
|
||||
:label="__('filament::permissions.roles.create')"
|
||||
:label="__('filament::roles.create')"
|
||||
:esc-close="true"
|
||||
:click-outside="true"
|
||||
class="sm:max-w-xl"
|
||||
@@ -57,7 +57,7 @@
|
||||
<button class="flex" wire:click.prevent="sortBy('created_at')">
|
||||
@include('filament::partials.sort-header', [
|
||||
'field' => 'created_at',
|
||||
'label' => __('filament::fields.created_at'),
|
||||
'label' => __('filament::labels.created_at'),
|
||||
])
|
||||
</button>
|
||||
</th>
|
||||
@@ -65,7 +65,7 @@
|
||||
<button class="flex" wire:click.prevent="sortBy('updated_at')">
|
||||
@include('filament::partials.sort-header', [
|
||||
'field' => 'updated_at',
|
||||
'label' => __('filament::fields.updated_at'),
|
||||
'label' => __('filament::labels.updated_at'),
|
||||
])
|
||||
</button>
|
||||
</th>
|
||||
@@ -89,7 +89,7 @@
|
||||
@push('footer')
|
||||
<x-filament-modal
|
||||
:id="'role-edit-'.$role->id"
|
||||
:label="__('filament::permissions.roles.edit')"
|
||||
:label="__('filament::roles.edit')"
|
||||
:esc-close="true"
|
||||
:click-outside="true"
|
||||
class="sm:max-w-xl"
|
||||
@@ -103,7 +103,7 @@
|
||||
@push('footer')
|
||||
<x-filament-modal
|
||||
:id="'role-delete-'.$role->id"
|
||||
:label="__('filament::permissions.roles.delete')"
|
||||
:label="__('filament::roles.delete')"
|
||||
:esc-close="true"
|
||||
:click-outside="true"
|
||||
class="sm:max-w-md"
|
||||
|
||||
@@ -28,17 +28,17 @@
|
||||
|
||||
<dl class="grid grid-cols-2 gap-2 md:gap-3 text-xs leading-tight">
|
||||
|
||||
<dt>{{ __('filament::fields.created_at') }}</dt>
|
||||
<dt>{{ __('filament::labels.created_at') }}</dt>
|
||||
<dd class="text-right">{{ $user->created_at->fromNow() }}</dd>
|
||||
|
||||
<dt>{{ __('filament::fields.updated_at') }}</dt>
|
||||
<dt>{{ __('filament::labels.updated_at') }}</dt>
|
||||
<dd class="text-right">{{ $user->updated_at->fromNow() }}</dd>
|
||||
|
||||
<dt>{{ __('filament::users.last_login_at') }}</dt>
|
||||
<dd class="text-right">{{ $user->last_login_at ? $user->last_login_at->fromNow() : __('filament::users.last_login_never') }}</dd>
|
||||
<dt>{{ __('Last login') }}</dt>
|
||||
<dd class="text-right">{{ $user->last_login_at ? $user->last_login_at->fromNow() : __('never') }}</dd>
|
||||
|
||||
@if ($user->last_login_ip)
|
||||
<dt>{{ __('filament::users.last_login_ip') }}</dt>
|
||||
<dt>{{ __('Last login IP') }}</dt>
|
||||
<dd class="text-right">{{ $user->last_login_ip }}</dd>
|
||||
@endif
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
@push('footer')
|
||||
<x-filament-modal
|
||||
id="user-create"
|
||||
:label="__('filament::permissions.permissions.create')"
|
||||
:label="__('filament::permissions.create')"
|
||||
:esc-close="true"
|
||||
:click-outside="true"
|
||||
class="sm:max-w-3xl"
|
||||
@@ -45,7 +45,7 @@
|
||||
</div>
|
||||
<div class="flex-shrink-0">
|
||||
@if ($user->is_super_admin)
|
||||
<x-filament-pill>{{ __('filament::permissions.super_admin') }}</x-filament-pill>
|
||||
<x-filament-pill>{{ __('filament::users.super_admin') }}</x-filament-pill>
|
||||
@elseif (count($user->roles))
|
||||
<ul>
|
||||
@foreach($user->roles as $role)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</x-slot>
|
||||
<p class="px-4 py-3">
|
||||
<span class="block text-xs leading-5 text-gray-400">
|
||||
{{ __('filament::auth.signed_in_as') }}
|
||||
{{ __('Signed in as') }}
|
||||
</span>
|
||||
@livewire('filament::auth-user-attribute', [
|
||||
'attribute' => 'email',
|
||||
@@ -28,7 +28,7 @@
|
||||
<a
|
||||
href="{{ route('filament.admin.users.edit', ['id' => auth()->user()->id]) }}"
|
||||
>
|
||||
{{ __('filament::users.settings') }}
|
||||
{{ __('Account settings') }}
|
||||
</a>
|
||||
<x-filament-form :action="route('filament.auth.logout')">
|
||||
<button type="submit">
|
||||
|
||||
@@ -25,7 +25,7 @@ class LoginController extends Controller
|
||||
return redirect($this->redirectTo());
|
||||
}
|
||||
|
||||
$title = __('filament::auth.login', ['name' => config('app.name')]);
|
||||
$title = config('app.name');
|
||||
|
||||
$fields = [
|
||||
Field::make('email', false, 'email')
|
||||
@@ -65,6 +65,8 @@ class LoginController extends Controller
|
||||
*/
|
||||
public function logout(Request $request)
|
||||
{
|
||||
$name = $request->user()->name;
|
||||
|
||||
$this->guard()->logout();
|
||||
|
||||
$request->session()->invalidate();
|
||||
@@ -79,7 +81,7 @@ class LoginController extends Controller
|
||||
? new Response('', 204)
|
||||
: redirect(route('filament.auth.login'))->with('notification', [
|
||||
'type' => 'success',
|
||||
'message' => __('filament::auth.logout'),
|
||||
'message' => __('filament::notifications.logged_out', ['name' => $name]),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -99,7 +101,7 @@ class LoginController extends Controller
|
||||
|
||||
session()->flash('notification', [
|
||||
'type' => 'success',
|
||||
'message' => __('filament::auth.logged_in', ['name' => $user->name]),
|
||||
'message' => __('filament::notifications.logged_in', ['name' => $user->name]),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ class RoleCreateFieldset implements Fieldset
|
||||
{
|
||||
public static function title(): string
|
||||
{
|
||||
return __('filament::permissions.roles.create');
|
||||
return __('filament::roles.create');
|
||||
}
|
||||
|
||||
public static function fields($model): array
|
||||
|
||||
@@ -11,7 +11,7 @@ class RoleEditFieldset implements Fieldset
|
||||
{
|
||||
public static function title(): string
|
||||
{
|
||||
return __('filament::permissions.roles.edit');
|
||||
return __('filament::roles.edit');
|
||||
}
|
||||
|
||||
public static function fields($model): array
|
||||
|
||||
@@ -12,7 +12,7 @@ class UserCreateFieldset implements Fieldset
|
||||
{
|
||||
public static function title(): string
|
||||
{
|
||||
return __('filament::users.create');
|
||||
return 'New User';
|
||||
}
|
||||
|
||||
public static function fields($model): array
|
||||
@@ -46,7 +46,7 @@ class UserCreateFieldset implements Fieldset
|
||||
Field::make('is_super_admin')
|
||||
->checkbox()
|
||||
->default(false)
|
||||
->help(__('filament::permissions.super_admin_info'))
|
||||
->help(__('filament::users.super_admin_info'))
|
||||
->group('permissions')
|
||||
->disabled(!auth()->user()->is_super_admin)
|
||||
->group('permissions'),
|
||||
@@ -62,7 +62,7 @@ class UserCreateFieldset implements Fieldset
|
||||
->pluck('id', 'name')
|
||||
->all())
|
||||
->rules([Rule::exists('permissions', 'id')])
|
||||
->help(__('filament::permissions.permissions.permissions_from_roles'))
|
||||
->help(__('filament::permissions.permissions_from_roles'))
|
||||
->disabled(!auth()->user()->can('edit user permissions'))
|
||||
->group('permissions'),
|
||||
];
|
||||
|
||||
@@ -55,7 +55,7 @@ class UserEditFieldset implements Fieldset
|
||||
->group('account'),
|
||||
Field::make('is_super_admin')
|
||||
->checkbox()
|
||||
->help(__('filament::permissions.super_admin_info'))
|
||||
->help(__('filament::users.super_admin_info'))
|
||||
->group('permissions')
|
||||
->disabled(!auth()->user()->is_super_admin),
|
||||
Field::make('roles')
|
||||
@@ -76,7 +76,7 @@ class UserEditFieldset implements Fieldset
|
||||
->pluck('id')
|
||||
->all()))
|
||||
->rules([Rule::exists('permissions', 'id')])
|
||||
->help(__('filament::permissions.permissions.permissions_from_roles'))
|
||||
->help(__('filament::permissions.permissions_from_roles'))
|
||||
->group('permissions')
|
||||
->disabled(!auth()->user()->can('edit user permissions')),
|
||||
];
|
||||
|
||||
@@ -9,7 +9,7 @@ class Dashboard extends Component
|
||||
public function render()
|
||||
{
|
||||
return view('filament::livewire.dashboard', [
|
||||
'title' => __('filament::admin.dashboard'),
|
||||
'title' => __('Dashboard'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,7 @@ class Permissions extends Component
|
||||
->paginate($this->perPage);
|
||||
|
||||
return view('filament::livewire.permissions.index', [
|
||||
'title' => __('filament::admin.permissions'),
|
||||
'title' => __('Permissions'),
|
||||
'permissions' => $permissions,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ class RoleCreate extends FormComponent
|
||||
public function render()
|
||||
{
|
||||
return view('filament::livewire.roles.create-edit', [
|
||||
'title' => __('filament::permissions.roles.create'),
|
||||
'title' => __('filament::roles.create'),
|
||||
'fields' => $this->fields(),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -30,8 +30,8 @@ class RoleDelete extends Component
|
||||
public function render()
|
||||
{
|
||||
return view('filament::livewire.confirm-delete', [
|
||||
'title' => __('filament::permissions.roles.delete'),
|
||||
'message' => __('filament::permissions.roles.delete_confirm', ['name' => $this->role->name]),
|
||||
'title' => __('filament::roles.delete'),
|
||||
'item' => $this->role->name,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -40,7 +40,7 @@ class RoleEdit extends FormComponent
|
||||
public function render()
|
||||
{
|
||||
return view('filament::livewire.roles.create-edit', [
|
||||
'title' => __('filament::permissions.roles.edit'),
|
||||
'title' => __('filament::roles.edit'),
|
||||
'fields' => $this->fields(),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ class Roles extends Component
|
||||
$roles = Role::orderBy($this->sortField, $this->sortAsc ? 'asc' : 'desc')->paginate($this->perPage);
|
||||
|
||||
return view('filament::livewire.roles.index', [
|
||||
'title' => __('filament::admin.roles'),
|
||||
'title' => __('Roles'),
|
||||
'roles' => $roles,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ class Users extends Component
|
||||
$this->authorize('view', $userClass);
|
||||
|
||||
return view('filament::livewire.users.index', [
|
||||
'title' => __('filament::admin.users'),
|
||||
'title' => __('Users'),
|
||||
'users' => $userClass::paginate(12),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -8,23 +8,6 @@ use Illuminate\Http\Request;
|
||||
|
||||
class Authenticate extends Middleware
|
||||
{
|
||||
|
||||
/**
|
||||
* Handle an unauthenticated user.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param array $guards
|
||||
* @return void
|
||||
*
|
||||
* @throws \Illuminate\Auth\AuthenticationException
|
||||
*/
|
||||
protected function unauthenticated(Request $request, array $guards)
|
||||
{
|
||||
throw new AuthenticationException(
|
||||
__('filament::auth.unauthenticated'), $guards, $this->redirectTo($request)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the path the user should be redirected to when they are not authenticated.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user