1 | <?php |
||
11 | class Instancia extends Base |
||
12 | { |
||
13 | public static $apresentationName = 'Instancias'; |
||
14 | |||
15 | protected $organizationPerspective = true; |
||
16 | |||
17 | protected $table = 'instancias'; |
||
18 | |||
19 | /** |
||
20 | * The attributes that are mass assignable. |
||
21 | * |
||
22 | * @var array |
||
23 | */ |
||
24 | protected $fillable = [ |
||
25 | 'name', |
||
26 | 'status', |
||
27 | ]; |
||
28 | |||
29 | |||
30 | protected $mappingProperties = array( |
||
31 | |||
32 | ); |
||
33 | |||
34 | |||
35 | public $formFields = [ |
||
36 | [ |
||
37 | 'name' => 'name', |
||
38 | 'label' => 'name', |
||
39 | 'type' => 'text' |
||
40 | ], |
||
41 | [ |
||
42 | 'name' => 'status', |
||
43 | 'label' => 'Status', |
||
44 | 'type' => 'checkbox' |
||
45 | ], |
||
46 | // [ |
||
47 | // 'name' => 'status', |
||
48 | // 'label' => 'Enter your content here', |
||
49 | // 'type' => 'textarea' |
||
50 | // ], |
||
51 | // ['name' => 'publish_on', 'label' => 'Publish Date', 'type' => 'date'], |
||
52 | // ['name' => 'category_id', 'label' => 'Category', 'type' => 'select', 'relationship' => 'category'], |
||
53 | // ['name' => 'tags', 'label' => 'Tags', 'type' => 'select_multiple', 'relationship' => 'tags'], |
||
54 | ]; |
||
55 | |||
56 | public $indexFields = [ |
||
57 | 'name', |
||
58 | 'status' |
||
59 | ]; |
||
60 | |||
61 | public $validationRules = [ |
||
62 | 'name' => 'required|max:255', |
||
63 | // 'url' => 'required|max:100', |
||
64 | 'status' => 'boolean', |
||
65 | // 'publish_on' => 'date', |
||
66 | // 'published' => 'boolean', |
||
67 | // 'category_id' => 'required|int', |
||
68 | ]; |
||
69 | |||
70 | public $validationMessages = [ |
||
71 | 'name.required' => "Nome é obrigatório." |
||
72 | ]; |
||
73 | |||
74 | public $validationAttributes = [ |
||
75 | 'name' => 'Name' |
||
76 | ]; |
||
77 | |||
78 | public function getName() |
||
82 | |||
83 | public function getApresentationName() |
||
90 | |||
91 | } |
||
92 |