1 | <?php namespace Arcanesoft\Blog\Http\Controllers\Admin; |
||
16 | class CategoriesController extends Controller |
||
17 | { |
||
18 | /* ----------------------------------------------------------------- |
||
19 | | Traits |
||
20 | | ----------------------------------------------------------------- |
||
21 | */ |
||
22 | |||
23 | use JsonResponses; |
||
24 | |||
25 | /* ----------------------------------------------------------------- |
||
26 | | Properties |
||
27 | | ----------------------------------------------------------------- |
||
28 | */ |
||
29 | |||
30 | /** |
||
31 | * The category model. |
||
32 | * |
||
33 | * @var \Arcanesoft\Blog\Models\Category |
||
34 | */ |
||
35 | private $category; |
||
36 | |||
37 | /* ----------------------------------------------------------------- |
||
38 | | Constructor |
||
39 | | ----------------------------------------------------------------- |
||
40 | */ |
||
41 | |||
42 | /** |
||
43 | * Instantiate the controller. |
||
44 | * |
||
45 | * @param \Arcanesoft\Blog\Models\Category $category |
||
46 | */ |
||
47 | public function __construct(Category $category) |
||
56 | |||
57 | /* ----------------------------------------------------------------- |
||
58 | | Main Methods |
||
59 | | ----------------------------------------------------------------- |
||
60 | */ |
||
61 | |||
62 | public function index($trashed = false) |
||
76 | |||
77 | public function trash() |
||
81 | |||
82 | public function create() |
||
91 | |||
92 | public function store(CreateCategoryRequest $request, Category $category) |
||
103 | |||
104 | public function show(Category $category) |
||
115 | |||
116 | public function edit(Category $category) |
||
125 | |||
126 | public function update(UpdateCategoryRequest $request, Category $category) |
||
136 | |||
137 | public function delete(Category $category) |
||
152 | |||
153 | public function restore(Category $category) |
||
168 | |||
169 | /* ----------------------------------------------------------------- |
||
170 | | Other Methods |
||
171 | | ----------------------------------------------------------------- |
||
172 | */ |
||
173 | |||
174 | /** |
||
175 | * Notify with translation. |
||
176 | * |
||
177 | * @param string $action |
||
178 | * @param array $replace |
||
179 | * @param array $context |
||
180 | * |
||
181 | * @return string |
||
182 | */ |
||
183 | protected function transNotification($action, array $replace = [], array $context = []) |
||
193 | } |
||
194 |