Skip to content

Commit

Permalink
settings migration and model
Browse files Browse the repository at this point in the history
  • Loading branch information
veneliniliev committed Jan 23, 2017
1 parent b8cbd69 commit 3bb619b
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 4 deletions.
5 changes: 2 additions & 3 deletions app/Dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@

namespace ProVision\Administration;

use Illuminate\Support\Facades\Facade;
use ProVision\Administration\Dashboard\DashboardBox;

class Dashboard extends Facade
class Dashboard
{
private static $dashboards = [];

Expand All @@ -25,7 +24,7 @@ public static function add(DashboardBox $object, $index = false)
}

if (isset(static::$dashboards[$index])) {
die('Box index duplicate: '.$index);
die('Box index duplicate: ' . $index);
}

static::$dashboards[$index] = $object;
Expand Down
16 changes: 16 additions & 0 deletions app/Settings.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

/*
* ProVision Administration, http://ProVision.bg
* Author: Venelin Iliev, http://veneliniliev.com
*/

namespace ProVision\Administration;

class Settings
{

protected $fillable = [

];
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.3.1",
"version": "0.4.0",
"name": "provision/administration",
"description": "ProVision Administration - laravel package",
"keywords": [
Expand Down
40 changes: 40 additions & 0 deletions database/migrations/2017_01_23_111236_create_settings_table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php

/*
* ProVision Administration, http://ProVision.bg
* Author: Venelin Iliev, http://veneliniliev.com
*/

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSettingsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('settings', function (Blueprint $table) {
$table->increments('id');
$table->string('module')->index();
$table->string('sub_module')->nullable()->default(null)->index();
$table->string('key')->index();
$table->longText('value')->nullable()->default(null);
$table->timestamps();
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('settings');
}
}

0 comments on commit 3bb619b

Please sign in to comment.