1
|
|
|
<?php namespace Arcanesoft\Blog\Http\Routes\Admin; |
2
|
|
|
|
3
|
|
|
use Arcanedev\Support\Bases\RouteRegister; |
4
|
|
|
use Arcanesoft\Blog\Models\Category; |
5
|
|
|
use Illuminate\Contracts\Routing\Registrar; |
6
|
|
|
|
7
|
|
|
/** |
8
|
|
|
* Class CategoriesRoutes |
9
|
|
|
* |
10
|
|
|
* @package Arcanesoft\Blog\Http\Routes\Admin |
11
|
|
|
* @author ARCANEDEV <[email protected]> |
12
|
|
|
*/ |
13
|
|
|
class CategoriesRoutes extends RouteRegister |
14
|
|
|
{ |
15
|
|
|
/* ------------------------------------------------------------------------------------------------ |
16
|
|
|
| Main Functions |
17
|
|
|
| ------------------------------------------------------------------------------------------------ |
18
|
|
|
*/ |
19
|
|
|
/** |
20
|
|
|
* Map routes. |
21
|
|
|
* |
22
|
|
|
* @param \Illuminate\Contracts\Routing\Registrar $router |
23
|
|
|
*/ |
24
|
6 |
|
public function map(Registrar $router) |
25
|
|
|
{ |
26
|
|
|
$this->group(['prefix' => 'categories', 'as' => 'categories.'], function () { |
27
|
6 |
|
$this->get('/', 'CategoriesController@index') |
28
|
6 |
|
->name('index'); // admin::blog.categories.index |
29
|
|
|
|
30
|
6 |
|
$this->get('trash', 'CategoriesController@trash') |
31
|
6 |
|
->name('trash'); // admin::blog.categories.trash |
32
|
|
|
|
33
|
6 |
|
$this->get('create', 'CategoriesController@create') |
34
|
6 |
|
->name('create'); // admin::blog.categories.create |
35
|
|
|
|
36
|
6 |
|
$this->post('store', 'CategoriesController@store') |
37
|
6 |
|
->name('store'); // admin::blog.categories.store |
38
|
|
|
|
39
|
|
|
$this->group(['prefix' => '{blog_category}'], function () { |
40
|
6 |
|
$this->get('/', 'CategoriesController@show') |
41
|
6 |
|
->name('show'); // admin::blog.categories.show |
42
|
|
|
|
43
|
6 |
|
$this->get('edit', 'CategoriesController@edit') |
44
|
6 |
|
->name('edit'); // admin::blog.categories.edit |
45
|
|
|
|
46
|
6 |
|
$this->put('update', 'CategoriesController@update') |
47
|
6 |
|
->name('update'); // admin::blog.categories.update |
48
|
|
|
|
49
|
6 |
|
$this->put('restore', 'CategoriesController@restore') |
50
|
6 |
|
->name('restore'); // admin::blog.categories.restore |
51
|
|
|
|
52
|
6 |
|
$this->delete('delete', 'CategoriesController@delete') |
53
|
6 |
|
->name('delete'); // admin::blog.categories.delete |
54
|
6 |
|
}); |
55
|
6 |
|
}); |
56
|
|
|
|
57
|
6 |
|
$this->bind('blog_category', function ($id) { |
58
|
|
|
return Category::withTrashed()->findOrFail($id); |
|
|
|
|
59
|
6 |
|
}); |
60
|
6 |
|
} |
61
|
|
|
} |
62
|
|
|
|
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.