|
1 | 1 | <?php
|
2 | 2 |
|
| 3 | +use Wink\Http\Controllers\ImageUploadsController; |
| 4 | +use Wink\Http\Controllers\LoginController; |
| 5 | +use Wink\Http\Controllers\PagesController; |
| 6 | +use Wink\Http\Controllers\PostsController; |
| 7 | +use Wink\Http\Controllers\SPAViewController; |
| 8 | +use Wink\Http\Controllers\TagsController; |
| 9 | +use Wink\Http\Controllers\TeamController; |
| 10 | + |
3 | 11 | // Blog Posts...
|
4 |
| -Route::get('/api/posts', 'PostsController@index')->name('posts.index'); |
5 |
| -Route::get('/api/posts/{id?}', 'PostsController@show')->name('posts.show'); |
6 |
| -Route::post('/api/posts/{id}', 'PostsController@store')->name('posts.store'); |
7 |
| -Route::delete('/api/posts/{id}', 'PostsController@delete')->name('posts.delete'); |
| 12 | +Route::get('/api/posts', [PostsController::class, 'index'])->name('posts.index'); |
| 13 | +Route::get('/api/posts/{id?}', [PostsController::class, 'show'])->name('posts.show'); |
| 14 | +Route::post('/api/posts/{id}', [PostsController::class, 'store'])->name('posts.store'); |
| 15 | +Route::delete('/api/posts/{id}', [PostsController::class, 'delete'])->name('posts.delete'); |
8 | 16 |
|
9 | 17 | // Blog Tags...
|
10 |
| -Route::get('/api/tags', 'TagsController@index')->name('tags.index'); |
11 |
| -Route::get('/api/tags/{id?}', 'TagsController@show')->name('tags.show'); |
12 |
| -Route::post('/api/tags/{id}', 'TagsController@store')->name('tags.store'); |
13 |
| -Route::delete('/api/tags/{id}', 'TagsController@delete')->name('tags.delete'); |
| 18 | +Route::get('/api/tags', [TagsController::class, 'index'])->name('tags.index'); |
| 19 | +Route::get('/api/tags/{id?}', [TagsController::class, 'show'])->name('tags.show'); |
| 20 | +Route::post('/api/tags/{id}', [TagsController::class, 'store'])->name('tags.store'); |
| 21 | +Route::delete('/api/tags/{id}', [TagsController::class, 'delete'])->name('tags.delete'); |
14 | 22 |
|
15 | 23 | // Blog Authors...
|
16 |
| -Route::get('/api/team', 'TeamController@index')->name('team.index'); |
17 |
| -Route::get('/api/team/{id?}', 'TeamController@show')->name('team.show'); |
18 |
| -Route::post('/api/team/{id}', 'TeamController@store')->name('team.store'); |
19 |
| -Route::delete('/api/team/{id}', 'TeamController@delete')->name('team.delete'); |
| 24 | +Route::get('/api/team', [TeamController::class, 'index'])->name('team.index'); |
| 25 | +Route::get('/api/team/{id?}', [TeamController::class, 'show'])->name('team.show'); |
| 26 | +Route::post('/api/team/{id}', [TeamController::class, 'store'])->name('team.store'); |
| 27 | +Route::delete('/api/team/{id}', [TeamController::class, 'delete'])->name('team.delete'); |
20 | 28 |
|
21 | 29 | // Blog Image Uploads
|
22 |
| -Route::post('/api/uploads', 'ImageUploadsController@upload')->name('images.store'); |
| 30 | +Route::post('/api/uploads', [ImageUploadsController::class, 'upload'])->name('images.store'); |
23 | 31 |
|
24 | 32 | // Blog Pages...
|
25 |
| -Route::get('/api/pages', 'PagesController@index')->name('pages.index'); |
26 |
| -Route::get('/api/pages/{id?}', 'PagesController@show')->name('pages.show'); |
27 |
| -Route::post('/api/pages/{id}', 'PagesController@store')->name('pages.store'); |
28 |
| -Route::delete('/api/pages/{id}', 'PagesController@delete')->name('pages.delete'); |
| 33 | +Route::get('/api/pages', [PagesController::class, 'index'])->name('pages.index'); |
| 34 | +Route::get('/api/pages/{id?}', [PagesController::class, 'show'])->name('pages.show'); |
| 35 | +Route::post('/api/pages/{id}', [PagesController::class, 'store'])->name('pages.store'); |
| 36 | +Route::delete('/api/pages/{id}', [PagesController::class, 'delete'])->name('pages.delete'); |
29 | 37 |
|
30 | 38 | // Logout Route...
|
31 |
| -Route::get('/logout', 'LoginController@logout')->name('logout'); |
| 39 | +Route::get('/logout', [LoginController::class, 'logout'])->name('logout'); |
32 | 40 |
|
33 | 41 | // Catch-all Route...
|
34 |
| -Route::get('/{view?}', 'SPAViewController')->name('spa')->where('view', '(.*)'); |
| 42 | +Route::get('/{view?}', SPAViewController::class)->name('spa')->where('view', '(.*)'); |
0 commit comments