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
|
|
|
|
2019-02-11 00:04:04 +01:00
|
|
|
Route::get('cron/{token}', 'API\CronController@run')->name('cron');
|
|
|
|
|
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('links', 'Models\LinkController');
|
2019-10-29 17:00:19 +01:00
|
|
|
Route::resource('lists', 'Models\ListController');
|
2018-09-09 21:24:08 +02:00
|
|
|
Route::resource('tags', 'Models\TagController');
|
2019-01-17 21:08:12 +01:00
|
|
|
Route::resource('notes', 'Models\NoteController')->except(['index', 'show']);
|
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-11 13:56:07 +01:00
|
|
|
Route::get('import', 'App\ImportController@getImport')->name('get-import');
|
|
|
|
Route::post('import', 'App\ImportController@doImport')->name('do-import');
|
|
|
|
|
2019-01-31 16:42:39 +01:00
|
|
|
Route::get('export', 'App\ExportController@getExport')->name('get-export');
|
|
|
|
Route::post('export', 'App\ExportController@doExport')->name('do-export');
|
|
|
|
|
2019-01-11 00:44:21 +01:00
|
|
|
Route::get('trash', 'App\TrashController@index')->name('get-trash');
|
|
|
|
Route::get('trash/clear/{model}', 'App\TrashController@clearTrash')->name('clear-trash');
|
|
|
|
Route::get('trash/restore/{model}/{id}', 'App\TrashController@restoreEntry')->name('trash-restore');
|
|
|
|
|
2019-01-11 17:09:51 +01:00
|
|
|
Route::get('settings', 'App\UserSettingsController@getUserSettings')->name('get-usersettings');
|
|
|
|
Route::post('settings/account', 'App\UserSettingsController@saveAccountSettings')->name('save-settings-account');
|
|
|
|
Route::post('settings/app', 'App\UserSettingsController@saveAppSettings')->name('save-settings-app');
|
2019-03-01 21:13:10 +01:00
|
|
|
Route::post('settings/change-password',
|
|
|
|
'App\UserSettingsController@changeUserPassword')->name('change-user-password');
|
|
|
|
Route::post('settings/generate-api-token',
|
|
|
|
'App\UserSettingsController@generateApiToken')->name('generate-api-token');
|
2019-01-09 23:47:34 +01:00
|
|
|
|
2019-02-11 00:08:49 +01:00
|
|
|
Route::get('settings/system', 'App\SystemSettingsController@getSystemSettings')->name('get-sysstemsettings');
|
|
|
|
Route::post('settings/system', 'App\SystemSettingsController@saveSystemSettings')->name('save-settings-system');
|
2019-03-01 21:13:10 +01:00
|
|
|
Route::post('settings/generate-cron-token',
|
|
|
|
'App\SystemSettingsController@generateCronToken')->name('generate-cron-token');
|
2019-02-11 00:08:49 +01:00
|
|
|
|
2018-09-09 21:24:08 +02:00
|
|
|
Route::post('ajax/tags', 'API\AjaxController@getTags')->name('ajax-tags');
|
2019-10-29 17:00:19 +01:00
|
|
|
Route::post('ajax/lists', 'API\AjaxController@getLists')->name('ajax-lists');
|
2019-04-27 10:56:18 +02:00
|
|
|
Route::post('ajax/existing-links', 'API\AjaxController@searchExistingUrls')->name('ajax-existing-links');
|
2018-08-23 10:37:15 +02:00
|
|
|
});
|
|
|
|
|
2019-01-10 23:42:19 +01:00
|
|
|
// Guest access routes
|
2019-03-01 21:13:10 +01:00
|
|
|
Route::prefix('guest')->middleware(['guestaccess'])->group(function () {
|
|
|
|
|
|
|
|
Route::resource('categories', 'Guest\CategoryController')
|
|
|
|
->only(['show'])
|
|
|
|
->names([
|
|
|
|
'show' => 'guest.categories.show',
|
|
|
|
]);
|
|
|
|
|
|
|
|
Route::resource('links', 'Guest\LinkController')
|
|
|
|
->only(['index'])
|
|
|
|
->names([
|
|
|
|
'index' => 'guest.links.index',
|
|
|
|
]);
|
|
|
|
|
|
|
|
Route::resource('tags', 'Guest\TagController')
|
|
|
|
->only(['show'])
|
|
|
|
->names([
|
|
|
|
'show' => 'guest.tags.show',
|
|
|
|
]);
|
|
|
|
});
|