2020-06-23 04:40:37 +00:00
|
|
|
<?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');
|
2020-06-28 16:57:23 +00:00
|
|
|
Route::get('/forgot/password', "SecurityController@viewForgotPassword");
|
2020-06-28 05:14:35 +00:00
|
|
|
Route::get('/register', "SecurityController@viewRegister");
|
2020-06-23 04:40:37 +00:00
|
|
|
|
|
|
|
Route::middleware('auth.web')->group(function () {
|
|
|
|
Route::get('/home', "TodoController@viewHome");
|
|
|
|
|
2020-06-24 06:09:01 +00:00
|
|
|
// This group is used for internal API provided by session
|
|
|
|
Route::prefix('/web')->group(function () {
|
2020-06-24 13:13:34 +00:00
|
|
|
// Todo
|
2020-06-24 06:09:01 +00:00
|
|
|
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");
|
2020-06-24 13:13:34 +00:00
|
|
|
|
|
|
|
// Todo Item
|
|
|
|
Route::get('/todo/item/mark/{id}', "TodoController@todoItemMarkComplete");
|
|
|
|
Route::get('/todo/item/unmark/{id}', "TodoController@todoItemMarkNotComplete");
|
|
|
|
|
|
|
|
Route::get('/todo/item/{todo_id}', "TodoController@todoItemList");
|
|
|
|
Route::post('/todo/item', "TodoController@todoItemCreate");
|
|
|
|
Route::put('/todo/item', "TodoController@todoItemEdit");
|
|
|
|
Route::get('/todo/item/{id}', "TodoController@todoItemView");
|
|
|
|
Route::delete('/todo/item/{id}', "TodoController@todoItemDelete");
|
2020-06-24 06:09:01 +00:00
|
|
|
});
|
2020-06-23 04:40:37 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
Route::post('/web/login', "SecurityController@formLogin");
|
2020-06-28 16:57:23 +00:00
|
|
|
Route::post('/web/forgot', "SecurityController@formForgotPassword");
|
2020-06-28 05:14:35 +00:00
|
|
|
Route::post('/web/register', "SecurityController@formRegister");
|
2020-06-23 04:40:37 +00:00
|
|
|
Route::get('/web/logout', "SecurityController@formLogout");
|