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