Repository URL to install this package:
|
Version:
3.2.3 ▾
|
<?php
namespace Evsmash\Articles\Schemas;
use Evsmash\Core\Schemas\Base;
use Evsmash\Settings\TranslationConfig as Translation;
class ArticlesTypes extends Base {
protected $table = 'articles_types';
// validate
static public function validate() {
return [
'name' => 'req|max:50',
];
}
// translation
static public function translation() {
$config = new Translation;
$config->set('name');
return $config;
}
// create
public function create() {
$this->schemaCreate(function($m) {
$m->increments('id');
$m->string('name', 50);
$m->nullabletimestamps();
$m->softDeletes();
});
}
}