1
0
mirror of https://github.com/Kovah/LinkAce.git synced 2025-01-17 21:28:30 +01:00
LinkAce/routes/web.php

83 lines
3.3 KiB
PHP
Raw Normal View History

<?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!
|
*/
Route::get('/', 'FrontController@index')->name('front');
2018-08-22 21:10:24 +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');
// 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');
// 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');
// 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
Route::group(['middleware' => ['auth']], function () {
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-09 21:24:08 +02:00
Route::get('search', 'App\SearchController@getSearch')->name('get-search');
Route::post('search', 'App\SearchController@doSearch')->name('do-search');
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');
});
// 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',
]);
});