1 | <?php |
||
14 | class AttributesController extends AuthorizedController |
||
15 | { |
||
16 | /** |
||
17 | * {@inheritdoc} |
||
18 | */ |
||
19 | protected $resource = 'attribute'; |
||
20 | |||
21 | /** |
||
22 | * List all attributes. |
||
23 | * |
||
24 | * @param \Cortex\Attributes\DataTables\Adminarea\AttributesDataTable $attributesDataTable |
||
25 | * |
||
26 | * @return \Illuminate\Http\JsonResponse|\Illuminate\View\View |
||
27 | */ |
||
28 | public function index(AttributesDataTable $attributesDataTable) |
||
35 | |||
36 | /** |
||
37 | * List attribute logs. |
||
38 | * |
||
39 | * @param \Cortex\Attributes\Models\Attribute $attribute |
||
|
|||
40 | * @param \Cortex\Foundation\DataTables\LogsDataTable $logsDataTable |
||
41 | * |
||
42 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
43 | */ |
||
44 | public function logs(Attribute $attribute, LogsDataTable $logsDataTable) |
||
53 | |||
54 | /** |
||
55 | * Create new attribute. |
||
56 | * |
||
57 | * @param \Cortex\Attributes\Models\Attribute $attribute |
||
58 | * |
||
59 | * @return \Illuminate\View\View |
||
60 | */ |
||
61 | public function create(Attribute $attribute) |
||
65 | |||
66 | /** |
||
67 | * Edit given attribute. |
||
68 | * |
||
69 | * @param \Cortex\Attributes\Models\Attribute $attribute |
||
70 | * |
||
71 | * @return \Illuminate\View\View |
||
72 | */ |
||
73 | public function edit(Attribute $attribute) |
||
77 | |||
78 | /** |
||
79 | * Show attribute create/edit form. |
||
80 | * |
||
81 | * @param \Cortex\Attributes\Models\Attribute $attribute |
||
82 | * |
||
83 | * @return \Illuminate\View\View |
||
84 | */ |
||
85 | protected function form(Attribute $attribute) |
||
99 | |||
100 | /** |
||
101 | * Store new attribute. |
||
102 | * |
||
103 | * @param \Cortex\Attributes\Http\Requests\Adminarea\AttributeFormRequest $request |
||
104 | * @param \Cortex\Attributes\Models\Attribute $attribute |
||
105 | * |
||
106 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
107 | */ |
||
108 | public function store(AttributeFormRequest $request, Attribute $attribute) |
||
112 | |||
113 | /** |
||
114 | * Update given attribute. |
||
115 | * |
||
116 | * @param \Cortex\Attributes\Http\Requests\Adminarea\AttributeFormRequest $request |
||
117 | * @param \Cortex\Attributes\Models\Attribute $attribute |
||
118 | * |
||
119 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
120 | */ |
||
121 | public function update(AttributeFormRequest $request, Attribute $attribute) |
||
125 | |||
126 | /** |
||
127 | * Process stored/updated attribute. |
||
128 | * |
||
129 | * @param \Illuminate\Foundation\Http\FormRequest $request |
||
130 | * @param \Cortex\Attributes\Models\Attribute $attribute |
||
131 | * |
||
132 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
133 | */ |
||
134 | protected function process(FormRequest $request, Attribute $attribute) |
||
147 | |||
148 | /** |
||
149 | * Destroy given attribute. |
||
150 | * |
||
151 | * @param \Cortex\Attributes\Models\Attribute $attribute |
||
152 | * |
||
153 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
154 | */ |
||
155 | public function destroy(Attribute $attribute) |
||
164 | } |
||
165 |