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:
@@ -67,4 +67,24 @@ class DemoPluginTest extends TestCase
|
||||
->assertOk()
|
||||
->assertSee('Hello World 演示页');
|
||||
}
|
||||
|
||||
public function test_hello_world_page_survives_missing_log_table(): void
|
||||
{
|
||||
\Illuminate\Support\Facades\Schema::dropIfExists('hello_world_logs');
|
||||
|
||||
$this->get('/hello-world')->assertOk()->assertSee('Hello World 演示页');
|
||||
}
|
||||
|
||||
public function test_enable_hello_world_runs_plugin_migrations(): void
|
||||
{
|
||||
\Illuminate\Support\Facades\Schema::dropIfExists('hello_world_logs');
|
||||
\Illuminate\Support\Facades\DB::table('migrations')
|
||||
->where('migration', 'like', '%hello_world_logs%')
|
||||
->delete();
|
||||
|
||||
app(PluginManager::class)->enable('demo.hello-world');
|
||||
|
||||
$this->assertTrue(\Illuminate\Support\Facades\Schema::hasTable('hello_world_logs'));
|
||||
$this->assertTrue(app(PluginManager::class)->isEnabled('demo.hello-world'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user