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