mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
create globals table
This commit is contained in:
+11
-7
@@ -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',
|
||||
],
|
||||
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateGlobalsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* The name of the table for the migration.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $tableName = 'globals';
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create($this->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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user