33 lines
1.3 KiB
PHP
33 lines
1.3 KiB
PHP
<?php
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Web Routes
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Here is where you can register web routes for your application. These
|
|
| routes are loaded by the RouteServiceProvider within a group which
|
|
| contains the "web" middleware group. Now create something great!
|
|
|
|
|
*/
|
|
|
|
Auth::routes();
|
|
|
|
Route::get('/', 'HomeController@index')->name('home');
|
|
|
|
Route::group(['prefix' => 'user', 'as' => 'user.'], function () {
|
|
Route::get('/{user}', 'UserController@show')->name('show');
|
|
Route::patch('/{user}', 'UserController@update')->name('update');
|
|
Route::delete('/{user}', 'UserController@destroy')->name('destroy');
|
|
Route::get('/{user}/edit', 'UserController@edit')->name('edit');
|
|
});
|
|
|
|
Route::group(['prefix' => 'book', 'as' => 'book.'], function () {
|
|
Route::post('/', 'BookController@store')->name('store');
|
|
Route::get('/create', 'BookController@create')->name('create');
|
|
Route::get('/{book}', 'BookController@show')->name('show');
|
|
Route::patch('/{book}', 'BookController@update')->name('update');
|
|
Route::delete('/{book}', 'BookController@destroy')->name('destroy');
|
|
Route::get('/{book}/edit', 'BookController@edit')->name('edit');
|
|
});
|