2018-10-04 19:10:43 +02:00
|
|
|
<?php
|
|
|
|
/*
|
2018-10-19 05:45:55 +02:00
|
|
|
* Authentication Routes Laravel Defaults... replaces //Auth::routes();
|
|
|
|
*/
|
2018-10-21 00:26:21 +02:00
|
|
|
|
2018-10-15 07:00:48 +02:00
|
|
|
Route::get('login', 'Auth\LoginController@showLoginForm')->name('login');
|
|
|
|
Route::post('login', 'Auth\LoginController@login');
|
|
|
|
Route::post('logout', 'Auth\LoginController@logout')->name('logout');
|
2018-10-21 00:26:21 +02:00
|
|
|
|
2018-10-19 05:45:55 +02:00
|
|
|
/*
|
|
|
|
* Signup Routes
|
|
|
|
*/
|
2018-10-21 00:26:21 +02:00
|
|
|
|
2018-10-19 05:45:55 +02:00
|
|
|
Route::redirect('/', '/login', 301);
|
2018-10-24 05:50:15 +02:00
|
|
|
Route::get('signup', 'AccountController@index')->name('signup');
|
|
|
|
Route::post('signup', 'AccountController@store')->name('signup.submit');
|
2018-10-19 05:45:55 +02:00
|
|
|
Route::get('contact/login', 'Auth\ContactLoginController@showLoginForm')->name('contact.login');
|
|
|
|
Route::post('contact/login', 'Auth\ContactLoginController@login')->name('contact.login.submit');
|
2018-10-21 00:26:21 +02:00
|
|
|
|
2018-10-19 05:45:55 +02:00
|
|
|
/*
|
|
|
|
* Password Reset Routes...
|
|
|
|
*/
|
2018-10-21 00:26:21 +02:00
|
|
|
|
2018-10-15 07:00:48 +02: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')->name('password.update');
|
2018-10-21 00:26:21 +02:00
|
|
|
|
2018-10-15 07:00:48 +02:00
|
|
|
/*
|
2018-10-19 05:45:55 +02:00
|
|
|
* Social authentication
|
2018-10-15 07:00:48 +02:00
|
|
|
*/
|
2018-10-21 00:26:21 +02:00
|
|
|
|
2018-10-19 05:45:55 +02:00
|
|
|
Route::get('auth/{provider}', 'Auth\LoginController@redirectToProvider');
|
|
|
|
Route::get('auth/{provider}/callback', 'Auth\LoginController@handleProviderCallback');
|
2018-10-21 00:26:21 +02:00
|
|
|
|
2018-10-15 07:00:48 +02:00
|
|
|
/*
|
2018-10-19 05:45:55 +02:00
|
|
|
* Authenticated User Routes
|
2018-10-15 07:00:48 +02:00
|
|
|
*/
|
2018-10-21 00:26:21 +02:00
|
|
|
|
2018-10-18 07:04:36 +02:00
|
|
|
Route::group(['middleware' => ['auth:user', 'db']], function () {
|
2018-10-12 13:29:34 +02:00
|
|
|
|
2018-11-02 11:54:46 +01:00
|
|
|
Route::resource('dashboard', 'DashboardController'); // name = (dashboard. index / create / show / update / destroy / edit
|
2018-10-19 05:45:55 +02:00
|
|
|
Route::get('logout', 'Auth\LoginController@logout')->name('user.logout');
|
|
|
|
Route::resource('invoices', 'InvoiceController'); // name = (invoices. index / create / show / update / destroy / edit
|
2018-10-29 04:16:17 +01:00
|
|
|
Route::resource('clients', 'ClientController'); // name = (clients. index / create / show / update / destroy / edit
|
2018-12-13 00:23:21 +01:00
|
|
|
Route::resource('c', 'CController'); // name = (clients. index / create / show / update / destroy / edit
|
2018-11-02 11:54:46 +01:00
|
|
|
Route::resource('user', 'UserProfileController'); // name = (clients. index / create / show / update / destroy / edit
|
2018-10-19 05:45:55 +02:00
|
|
|
Route::get('settings', 'SettingsController@index')->name('user.settings');
|
2018-10-15 07:00:48 +02:00
|
|
|
|
2018-10-29 04:16:17 +01:00
|
|
|
|
|
|
|
|
2018-10-19 05:45:55 +02:00
|
|
|
});
|
2018-10-21 00:26:21 +02:00
|
|
|
|
2018-10-19 05:45:55 +02:00
|
|
|
/*
|
|
|
|
* Inbound routes requiring DB Lookup
|
|
|
|
*/
|
2018-10-29 04:16:17 +01:00
|
|
|
Route::group(['middleware' => ['url-db']], function () {
|
2018-10-15 07:00:48 +02:00
|
|
|
|
2018-10-24 12:24:09 +02:00
|
|
|
Route::get('/user/confirm/{confirmation_code}', 'UserController@confirm');
|
|
|
|
|
|
|
|
});
|
2018-10-29 04:16:17 +01:00
|
|
|
|
2018-10-15 07:00:48 +02:00
|
|
|
/*
|
|
|
|
Authenticated Contact Routes
|
|
|
|
*/
|
2018-10-21 00:26:21 +02:00
|
|
|
|
2018-10-15 07:00:48 +02:00
|
|
|
Route::group(['prefix' => 'contact', 'middleware' => 'auth:contact'], function () {
|
2018-10-12 13:29:34 +02:00
|
|
|
|
2018-10-15 07:00:48 +02:00
|
|
|
Route::get('/', 'ContactController@index')->name('contact.dashboard');
|
2018-10-19 05:45:55 +02:00
|
|
|
Route::get('logout', 'Auth\ContactLoginController@logout')->name('contact.logout');
|
2018-10-15 07:00:48 +02:00
|
|
|
|
2018-10-21 00:26:21 +02:00
|
|
|
});
|
|
|
|
|
2018-11-10 14:24:36 +01:00
|
|
|
/*
|
|
|
|
* Injects users translation strings in json format for frontend consumption.
|
|
|
|
*/
|
|
|
|
Route::get('js/lang.js', 'TranslationController@index')->name('assets.lang');
|
|
|
|
|
|
|
|
|
2018-10-29 04:16:17 +01:00
|
|
|
|
|
|
|
/* Dev Playground
|
|
|
|
Route::get('/mailable', function () {
|
|
|
|
$user = App\Models\User::find(1);
|
|
|
|
|
|
|
|
return new App\Mail\VerifyUser($user);
|
|
|
|
});
|
|
|
|
|
|
|
|
*/
|