feat: add admin env badge, quick post button, and harden plugin enable
Show local/prod in the Filament topbar, jump to create post in one click, tighten sidebar spacing, and stop Hello World from 500ing when its tables are missing. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
@php
|
||||
$environmentName = \App\Filament\Support\AdminEnvironment::name();
|
||||
$environmentColor = \App\Filament\Support\AdminEnvironment::color();
|
||||
$createPostUrl = \App\Filament\Resources\Posts\PostResource::getUrl('create');
|
||||
@endphp
|
||||
|
||||
<div class="ll-topbar-tools">
|
||||
<x-filament::badge :color="$environmentColor" size="sm" class="ll-env-badge">
|
||||
{{ $environmentName }}
|
||||
</x-filament::badge>
|
||||
|
||||
<x-filament::button
|
||||
tag="a"
|
||||
:href="$createPostUrl"
|
||||
size="sm"
|
||||
color="primary"
|
||||
icon="heroicon-o-pencil-square"
|
||||
wire:navigate
|
||||
>
|
||||
写文章
|
||||
</x-filament::button>
|
||||
</div>
|
||||
Reference in New Issue
Block a user