Repository URL to install this package:
|
Version:
3.2.0 ▾
|
<?php
namespace Evsmash\Items\Schemas;
use Evsmash\Core\Schemas\Base;
class ItemsParameters extends Base {
protected $table = 'items_parameters';
// validate
static public function validate() {
return [
'param' => 'req|max:50',
'value' => 'max:100000',
'item_id' => 'req|int',
];
}
// create
public function create() {
$this->schemaCreate(function($m) {
$m->increments('id');
$m->string('param', 50);
$m->text('value');
$m->integer('item_id');
});
}
}