help desk crud
This commit is contained in:
parent
08626cfeee
commit
b9e26d15d5
|
|
@ -36,6 +36,7 @@ class HelpTicketCategoryCrudController extends CrudController
|
|||
// TODO: remove setFromDb() and manually define Fields and Columns
|
||||
// $this->crud->setFromDb();
|
||||
$this->crud->setColumns([
|
||||
['name' => 'position','label'=>'Order Position','type'=>'number'],
|
||||
['name' => 'title_tk','label'=>'Title Turkmen','type'=>'text'],
|
||||
['name' => 'title_ru','label'=>'Title Russioan','type'=>'text'],
|
||||
['name' => 'active', 'label' => 'Active', 'type' => 'check']
|
||||
|
|
@ -43,6 +44,7 @@ class HelpTicketCategoryCrudController extends CrudController
|
|||
|
||||
$this->crud->addFields([
|
||||
['name' => 'title_tk','label'=>'Title Turkmen','type'=>'text'],
|
||||
['name' => 'position','label'=>'Order Position','type'=>'number'],
|
||||
['name' => 'title_ru','label'=>'Title Russioan','type'=>'text'],
|
||||
['name' => 'active', 'label' => 'Active', 'type' => 'checkbox']
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -59,4 +59,15 @@ class HelpTicket extends Model
|
|||
| MUTATORS
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
/**
|
||||
* Boot all of the bootable traits on the model.
|
||||
*/
|
||||
public static function boot()
|
||||
{
|
||||
parent::boot();
|
||||
|
||||
static::creating(function ($ticket) {
|
||||
$ticket->code = strtoupper(str_random(5)) . date('jn');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ class CreateHelpTicketCategoriesTable extends Migration
|
|||
$table->string('title_tk');
|
||||
$table->string('title_ru');
|
||||
$table->boolean('active')->default(1);
|
||||
$table->integer('position')->default(1);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue