27 lines
798 B
PHP
27 lines
798 B
PHP
<?php
|
||
namespace Lycoreco\Apps\Admin\Controllers;
|
||
|
||
use Lycoreco\Includes\Model\ValidationError;
|
||
use Lycoreco\Apps\Recipes\Models\IngredientModel;
|
||
|
||
class IngredientController extends Abstract\AdminSingleController
|
||
{
|
||
protected $model_сlass_name = "Lycoreco\Apps\Recipes\Models\IngredientModel";
|
||
protected $field_title = 'field_name';
|
||
protected $verbose_name = 'ingredient';
|
||
protected $object_router_name = 'admin:ingredient';
|
||
|
||
protected $fields = array(
|
||
[
|
||
'model_field' => 'name',
|
||
'input_type' => 'text',
|
||
'input_attrs' => ['required']
|
||
],
|
||
[
|
||
'model_field' => 'unit_name',
|
||
'input_type' => 'text',
|
||
'input_attrs' => ['required'],
|
||
'input_label' => 'Unit name'
|
||
]
|
||
);
|
||
} |