From 367c550ef18cd770277db623cad86fd514c55879 Mon Sep 17 00:00:00 2001 From: Ryan Scherler Date: Fri, 10 Apr 2020 20:07:35 -0700 Subject: [PATCH] create globals table --- config/filament.php | 18 +++++---- ...2020_04_10_100000_create_globals_table.php | 40 +++++++++++++++++++ 2 files changed, 51 insertions(+), 7 deletions(-) create mode 100644 database/migrations/2020_04_10_100000_create_globals_table.php diff --git a/config/filament.php b/config/filament.php index f3382f0d31..a7563d0579 100644 --- a/config/filament.php +++ b/config/filament.php @@ -74,16 +74,20 @@ return [ /* TODO - 'Resources' => [ - 'label' => 'filament::admin.resources', - 'icon' => 'heroicons/heroicon-o-collection', - 'url' => '#', - ], - 'globals' => [ 'label' => 'filament::admin.globals', 'icon' => 'heroicons/heroicon-o-globe', - 'url' => '#', + 'url' => 'filament.admin.globals.index', + 'active' => 'filament.admin.globals.*', + 'ability' => 'view globals', + ], + + 'Resources' => [ + 'label' => 'filament::admin.collections', + 'icon' => 'heroicons/heroicon-o-collection', + 'url' => 'filament.admin.collections.index', + 'active' => 'filament.admin.collections.*', + 'ability' => 'view collections', ], */ diff --git a/database/migrations/2020_04_10_100000_create_globals_table.php b/database/migrations/2020_04_10_100000_create_globals_table.php new file mode 100644 index 0000000000..8a89eecd88 --- /dev/null +++ b/database/migrations/2020_04_10_100000_create_globals_table.php @@ -0,0 +1,40 @@ +tableName, function (Blueprint $table) { + $table->id(); + $table->string('name')->unique(); + $table->string('title')->nullable(); + $table->text('description')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists($this->tableName); + } +} \ No newline at end of file