2018-08-22 20:54:44 +02:00
|
|
|
<?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!
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2019-01-10 23:42:19 +01:00
|
|
|
Route::get('/', 'FrontController@index')->name('front');
|
2018-08-22 21:10:24 +02:00
|
|
|
|
2018-08-22 22:38:43 +02:00
|
|
|
// Authentication Routes
|
2019-01-10 22:39:01 +01:00
|
|
|
Route::get('login', 'Auth\LoginController@showLoginForm')->name('login');
|
|
|
|
Route::post('login', 'Auth\LoginController@login');
|
|
|
|
Route::post('logout', 'Auth\LoginController@logout')->name('logout');
|
2018-08-22 22:38:43 +02:00
|
|
|
|
|
|
|
// Registration Routes (disabled, use the `artisan registeruser` command)
|
2019-01-10 22:39:01 +01:00
|
|
|
//Route::get('register', 'Auth\RegisterController@showRegistrationForm')->name('register');
|
|
|
|
//Route::post('register', 'Auth\RegisterController@register');
|
2018-08-22 22:38:43 +02:00
|
|
|
|
|
|
|
// Password Reset Routes
|
2019-01-10 22:39:01 +01:00
|
|
|
Route::get('password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm')->name('password.request');
|
|
|
|
Route::post('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail')->name('password.email');
|
|
|
|
Route::get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm')->name('password.reset');
|
|
|
|
Route::post('password/reset', 'Auth\ResetPasswordController@reset');
|
|
|
|
|
2019-01-10 23:42:19 +01:00
|
|
|
// Bookmarklet routes
|
2019-01-10 22:39:01 +01:00
|
|
|
Route::prefix('bookmarklet')->group(function () {
|
|
|
|
Route::get('add', 'App\BookmarkletController@getLinkAddForm')->name('bookmarklet-add');
|
|
|
|
Route::get('show', 'App\BookmarkletController@getCompleteView')->name('bookmarklet-complete');
|
|
|
|
Route::get('login', 'App\BookmarkletController@getLoginForm')->name('bookmarklet-login');
|
|
|
|
});
|
2018-08-22 21:10:24 +02:00
|
|
|
|
2018-08-23 01:09:48 +02:00
|
|
|
// Model routes
|
2018-08-23 10:37:15 +02:00
|
|
|
Route::group(['middleware' => ['auth']], function () {
|
2019-01-10 23:42:19 +01:00
|
|
|
Route::get('dashboard', 'App\DashboardController@index')->name('dashboard');
|
2018-09-09 21:44:54 +02:00
|
|
|
|
2018-09-09 21:24:08 +02:00
|
|
|
Route::resource('categories', 'Models\CategoryController');
|
|
|
|
Route::resource('links', 'Models\LinkController');
|
|
|
|
Route::resource('notes', 'Models\NoteController');
|
|
|
|
Route::resource('tags', 'Models\TagController');
|
2018-09-06 21:09:20 +02:00
|
|
|
|
2018-09-09 21:24:08 +02:00
|
|
|
Route::get('search', 'App\SearchController@getSearch')->name('get-search');
|
|
|
|
Route::post('search', 'App\SearchController@doSearch')->name('do-search');
|
2018-09-06 22:53:16 +02:00
|
|
|
|
2019-01-10 23:42:19 +01:00
|
|
|
Route::get('settings', 'App\UserSettingsController@getUserSettings')
|
|
|
|
->name('get-usersettings');
|
|
|
|
Route::post('settings', 'App\UserSettingsController@saveUserSettings')
|
|
|
|
->name('save-usersettings');
|
|
|
|
Route::post('settings/change-password', 'App\UserSettingsController@changeUserPassword')
|
|
|
|
->name('change-user-password');
|
2019-01-09 23:47:34 +01:00
|
|
|
|
2018-09-09 21:24:08 +02:00
|
|
|
Route::post('ajax/tags', 'API\AjaxController@getTags')->name('ajax-tags');
|
2018-08-23 10:37:15 +02:00
|
|
|
});
|
|
|
|
|
2019-01-10 23:42:19 +01:00
|
|
|
// Guest access routes
|
|
|
|
Route::prefix('guest')->middleware(['guest'])->group(function () {
|
|
|
|
|
|
|
|
Route::resource('categories', 'Guest\CategoryController')
|
|
|
|
->only(['index', 'show'])
|
|
|
|
->names([
|
|
|
|
'index' => 'guest.categories.index',
|
|
|
|
'show' => 'guest.categories.show',
|
|
|
|
]);
|
|
|
|
|
|
|
|
Route::resource('links', 'Guest\LinkController')
|
|
|
|
->only(['index'])
|
|
|
|
->names([
|
|
|
|
'index' => 'guest.links.index',
|
|
|
|
]);
|
|
|
|
|
|
|
|
Route::resource('tags', 'Guest\TagController')
|
|
|
|
->only(['index', 'show'])
|
|
|
|
->names([
|
|
|
|
'index' => 'guest.tags.index',
|
|
|
|
'show' => 'guest.tags.show',
|
|
|
|
]);
|
|
|
|
});
|