1
|
|
|
<?php namespace Arcanesoft\Blog\Http\Routes\Admin; |
2
|
|
|
|
3
|
|
|
use Arcanedev\Support\Routing\RouteRegistrar; |
4
|
|
|
use Arcanesoft\Blog\Models\Category; |
5
|
|
|
|
6
|
|
|
/** |
7
|
|
|
* Class CategoriesRoutes |
8
|
|
|
* |
9
|
|
|
* @package Arcanesoft\Blog\Http\Routes\Admin |
10
|
|
|
* @author ARCANEDEV <[email protected]> |
11
|
|
|
*/ |
12
|
|
|
class CategoriesRoutes extends RouteRegistrar |
13
|
|
|
{ |
14
|
|
|
/* ------------------------------------------------------------------------------------------------ |
15
|
|
|
| Main Functions |
16
|
|
|
| ------------------------------------------------------------------------------------------------ |
17
|
|
|
*/ |
18
|
|
|
/** |
19
|
|
|
* Map routes. |
20
|
|
|
*/ |
21
|
6 |
|
public function map() |
22
|
|
|
{ |
23
|
|
|
$this->prefix('categories')->name('categories.')->group(function () { |
24
|
6 |
|
$this->get('/', 'CategoriesController@index') |
25
|
6 |
|
->name('index'); // admin::blog.categories.index |
26
|
|
|
|
27
|
6 |
|
$this->get('trash', 'CategoriesController@trash') |
28
|
6 |
|
->name('trash'); // admin::blog.categories.trash |
29
|
|
|
|
30
|
6 |
|
$this->get('create', 'CategoriesController@create') |
31
|
6 |
|
->name('create'); // admin::blog.categories.create |
32
|
|
|
|
33
|
6 |
|
$this->post('store', 'CategoriesController@store') |
34
|
6 |
|
->name('store'); // admin::blog.categories.store |
35
|
|
|
|
36
|
|
|
$this->prefix('{blog_category}')->group(function () { |
37
|
6 |
|
$this->get('/', 'CategoriesController@show') |
38
|
6 |
|
->name('show'); // admin::blog.categories.show |
39
|
|
|
|
40
|
6 |
|
$this->get('edit', 'CategoriesController@edit') |
41
|
6 |
|
->name('edit'); // admin::blog.categories.edit |
42
|
|
|
|
43
|
6 |
|
$this->put('update', 'CategoriesController@update') |
44
|
6 |
|
->name('update'); // admin::blog.categories.update |
45
|
|
|
|
46
|
6 |
|
$this->put('restore', 'CategoriesController@restore') |
47
|
6 |
|
->name('restore'); // admin::blog.categories.restore |
48
|
|
|
|
49
|
6 |
|
$this->delete('delete', 'CategoriesController@delete') |
50
|
6 |
|
->name('delete'); // admin::blog.categories.delete |
51
|
6 |
|
}); |
52
|
6 |
|
}); |
53
|
|
|
|
54
|
6 |
|
$this->bind('blog_category', function ($id) { |
55
|
|
|
return Category::withTrashed()->findOrFail($id); |
|
|
|
|
56
|
6 |
|
}); |
57
|
6 |
|
} |
58
|
|
|
} |
59
|
|
|
|
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.