Update Category model and migration

This commit is contained in:
DariusIII
2017-09-05 14:27:02 +02:00
parent 82d7d8ba82
commit 433c39a4e7
5 changed files with 47 additions and 15 deletions
+1
View File
@@ -1,4 +1,5 @@
2017-09-05 DariusIII
* Chg: Update Category model and migration
* Fix: Override __get method and fix site edit page
* Chg: Update .php-cs to exclude bootstrap/cache from checks
* Chg: Update pages
-10
View File
@@ -1,10 +0,0 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Categories extends Model
{
//
}
+32
View File
@@ -0,0 +1,32 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Category extends Model
{
/**
* @var bool
*/
public $timestamps = false;
/**
* @var bool
*/
protected $dateFormat = false;
/**
* @var array
*/
protected $fillable = [
'id',
'title',
'parentid',
'status',
'description',
'disablepreview',
'minsizetoformrelease',
'maxsizetoformrelease',
];
}
Generated
+4 -4
View File
@@ -139,7 +139,7 @@
}
],
"description": "PHP Wrapper for Accessing the Steam Storefront API",
"time": "2017-08-27 15:14:06"
"time": "2017-08-27T15:14:06+00:00"
},
{
"name": "barracudanetworks/forkdaemon-php",
@@ -1468,7 +1468,7 @@
}
],
"description": "A PHP library that acts as a wrapper for the GiantBomb API.",
"time": "2017-05-29 12:05:57"
"time": "2017-05-29T12:05:57+00:00"
},
{
"name": "dnoegel/php-xdg-base-dir",
@@ -2290,7 +2290,7 @@
}
],
"description": "TVMaze-API-Wrapper",
"time": "2016-05-04 01:31:56"
"time": "2016-05-04T01:31:56+00:00"
},
{
"name": "kbjr/Git.php",
@@ -2316,7 +2316,7 @@
"source": "https://github.com/kbjr/Git.php/tree/master",
"issues": "https://github.com/kbjr/Git.php/issues"
},
"time": "2015-03-31 14:10:29"
"time": "2015-03-31T14:10:29+00:00"
},
{
"name": "kevinrob/guzzle-cache-middleware",
@@ -15,7 +15,16 @@ class CreateCategoriesTable extends Migration
{
Schema::create('categories', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->string('title');
$table->integer('parentid');
$table->tinyInteger('status');
$table->string('description');
$table->tinyInteger('disablepreview');
$table->bigInteger('minsizetoformrelease');
$table->bigInteger('maxsizetoformrelease');
$table->primary('id');
$table->index('status');
$table->index('parentid');
});
}