1
|
|
|
<?php namespace Arcanesoft\Seo\Http\Routes\Admin; |
2
|
|
|
|
3
|
|
|
use Arcanedev\Support\Routing\RouteRegistrar; |
4
|
|
|
use Arcanesoft\Seo\Models\Page; |
5
|
|
|
|
6
|
|
|
/** |
7
|
|
|
* Class PagesRoutes |
8
|
|
|
* |
9
|
|
|
* @package Arcanesoft\Seo\Http\Routes\Admin |
10
|
|
|
* @author ARCANEDEV <[email protected]> |
11
|
|
|
*/ |
12
|
|
|
class PagesRoutes extends RouteRegistrar |
13
|
|
|
{ |
14
|
|
|
/* ----------------------------------------------------------------- |
15
|
|
|
| Main Methods |
16
|
|
|
| ----------------------------------------------------------------- |
17
|
|
|
*/ |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* Register the bindings. |
21
|
|
|
*/ |
22
|
32 |
|
public static function bindings() |
23
|
|
|
{ |
24
|
32 |
|
$registrar = new static; |
25
|
|
|
|
26
|
|
|
$registrar->bind('seo_page', function ($id) { |
27
|
|
|
return Page::findOrFail($id); |
28
|
32 |
|
}); |
29
|
32 |
|
} |
30
|
|
|
|
31
|
|
|
/** |
32
|
|
|
* Define the routes for the application. |
33
|
|
|
*/ |
34
|
32 |
|
public function map() |
35
|
|
|
{ |
36
|
|
|
$this->prefix('pages')->name('pages.')->group(function () { |
37
|
32 |
|
$this->get('/', 'PagesController@index') |
38
|
32 |
|
->name('index'); // admin::seo.pages.index |
39
|
|
|
|
40
|
32 |
|
$this->get('create', 'PagesController@create') |
41
|
32 |
|
->name('create'); // admin::seo.pages.create |
42
|
|
|
|
43
|
32 |
|
$this->post('store', 'PagesController@store') |
44
|
32 |
|
->name('store'); // admin::seo.pages.store |
45
|
|
|
|
46
|
32 |
|
$this->prefix('{seo_page}')->group(function () { |
47
|
32 |
|
$this->get('/', 'PagesController@show') |
48
|
32 |
|
->name('show'); // admin::seo.pages.show |
49
|
|
|
|
50
|
32 |
|
$this->get('edit', 'PagesController@edit') |
51
|
32 |
|
->name('edit'); // admin::seo.pages.edit |
52
|
|
|
|
53
|
32 |
|
$this->put('update', 'PagesController@update') |
54
|
32 |
|
->name('update'); // admin::seo.pages.update |
55
|
|
|
|
56
|
32 |
|
$this->delete('delete', 'PagesController@delete') |
57
|
32 |
|
->middleware('ajax') |
58
|
32 |
|
->name('delete'); // admin::seo.pages.delete |
59
|
32 |
|
}); |
60
|
32 |
|
}); |
61
|
32 |
|
} |
62
|
|
|
} |
63
|
|
|
|