1 | <?php |
||
14 | class TestimonialsController extends AuthorizedController |
||
15 | { |
||
16 | /** |
||
17 | * {@inheritdoc} |
||
18 | */ |
||
19 | protected $resource = 'testimonial'; |
||
20 | |||
21 | /** |
||
22 | * List all testimonials. |
||
23 | * |
||
24 | * @param \Cortex\Testimonials\DataTables\Adminarea\TestimonialsDataTable $testimonialsDataTable |
||
25 | * |
||
26 | * @return \Illuminate\Http\JsonResponse|\Illuminate\View\View |
||
27 | */ |
||
28 | public function index(TestimonialsDataTable $testimonialsDataTable) |
||
35 | |||
36 | /** |
||
37 | * List testimonial logs. |
||
38 | * |
||
39 | * @param \Cortex\Testimonials\Models\Testimonial $testimonial |
||
40 | * @param \Cortex\Foundation\DataTables\LogsDataTable $logsDataTable |
||
41 | * |
||
42 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
43 | */ |
||
44 | public function logs(Testimonial $testimonial, LogsDataTable $logsDataTable) |
||
53 | |||
54 | /** |
||
55 | * Create new testimonial. |
||
56 | * |
||
57 | * @param \Cortex\Testimonials\Models\Testimonial $testimonial |
||
58 | * |
||
59 | * @return \Illuminate\View\View |
||
60 | */ |
||
61 | public function create(Testimonial $testimonial) |
||
65 | |||
66 | /** |
||
67 | * Edit given testimonial. |
||
68 | * |
||
69 | * @param \Cortex\Testimonials\Models\Testimonial $testimonial |
||
70 | * |
||
71 | * @return \Illuminate\View\View |
||
72 | */ |
||
73 | public function edit(Testimonial $testimonial) |
||
77 | |||
78 | /** |
||
79 | * Show testimonial create/edit form. |
||
80 | * |
||
81 | * @param \Cortex\Testimonials\Models\Testimonial $testimonial |
||
82 | * |
||
83 | * @return \Illuminate\View\View |
||
84 | */ |
||
85 | protected function form(Testimonial $testimonial) |
||
89 | |||
90 | /** |
||
91 | * Store new testimonial. |
||
92 | * |
||
93 | * @param \Cortex\Testimonials\Http\Requests\Adminarea\TestimonialFormRequest $request |
||
94 | * @param \Cortex\Testimonials\Models\Testimonial $testimonial |
||
95 | * |
||
96 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
97 | */ |
||
98 | public function store(TestimonialFormRequest $request, Testimonial $testimonial) |
||
102 | |||
103 | /** |
||
104 | * Update given testimonial. |
||
105 | * |
||
106 | * @param \Cortex\Testimonials\Http\Requests\Adminarea\TestimonialFormRequest $request |
||
107 | * @param \Cortex\Testimonials\Models\Testimonial $testimonial |
||
108 | * |
||
109 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
110 | */ |
||
111 | public function update(TestimonialFormRequest $request, Testimonial $testimonial) |
||
115 | |||
116 | /** |
||
117 | * Process stored/updated testimonial. |
||
118 | * |
||
119 | * @param \Illuminate\Foundation\Http\FormRequest $request |
||
120 | * @param \Cortex\Testimonials\Models\Testimonial $testimonial |
||
121 | * |
||
122 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
123 | */ |
||
124 | protected function process(FormRequest $request, Testimonial $testimonial) |
||
137 | |||
138 | /** |
||
139 | * Destroy given testimonial. |
||
140 | * |
||
141 | * @param \Cortex\Testimonials\Models\Testimonial $testimonial |
||
142 | * |
||
143 | * @return \Illuminate\Http\Response |
||
144 | */ |
||
145 | public function destroy(Testimonial $testimonial) |
||
154 | } |
||
155 |
Very long variable names usually make code harder to read. It is therefore recommended not to make variable names too verbose.