create globals table

This commit is contained in:
Ryan Scherler
2020-04-10 20:07:35 -07:00
parent de53726f2f
commit 367c550ef1
2 changed files with 51 additions and 7 deletions
+11 -7
View File
@@ -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);
}
}