todo/routes/web.php
Supan Adit Pratama 981fc35917 Update migration
2020-06-24 13:09:01 +07:00

34 lines
1.2 KiB
PHP
Executable File

<?php
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| 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!
|
*/
Route::get('/', "SecurityController@initSystem");
Route::get('/login', "SecurityController@viewLogin")->name('login');
Route::middleware('auth.web')->group(function () {
Route::get('/home', "TodoController@viewHome");
// This group is used for internal API provided by session
Route::prefix('/web')->group(function () {
Route::get('/todo', "TodoController@todoList");
Route::post('/todo', "TodoController@todoCreate");
Route::put('/todo', "TodoController@todoEdit");
Route::get('/todo/{id}', "TodoController@todoView");
Route::delete('/todo/{id}', "TodoController@todoDelete");
});
});
Route::post('/web/login', "SecurityController@formLogin");
Route::get('/web/logout', "SecurityController@formLogout");