1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00
invoiceninja/routes/web.php

91 lines
3.3 KiB
PHP
Raw Normal View History

2018-10-04 19:10:43 +02:00
<?php
/*
* Authentication Routes Laravel Defaults... replaces //Auth::routes();
*/
Route::get('login', 'Auth\LoginController@showLoginForm')->name('login');
Route::post('login', 'Auth\LoginController@login');
Route::post('logout', 'Auth\LoginController@logout')->name('logout');
/*
* Signup Routes
*/
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');
Route::get('contact/login', 'Auth\ContactLoginController@showLoginForm')->name('contact.login');
Route::post('contact/login', 'Auth\ContactLoginController@login')->name('contact.login.submit');
/*
* Password Reset Routes...
*/
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');
/*
* Social authentication
*/
Route::get('auth/{provider}', 'Auth\LoginController@redirectToProvider');
Route::get('auth/{provider}/callback', 'Auth\LoginController@handleProviderCallback');
/*
* Authenticated User Routes
*/
Route::group(['middleware' => ['auth:user', 'db']], function () {
Route::resource('dashboard', 'DashboardController'); // name = (dashboard. index / create / show / update / destroy / edit
Route::get('logout', 'Auth\LoginController@logout')->name('user.logout');
Route::resource('invoices', 'InvoiceController'); // name = (invoices. index / create / show / update / destroy / edit
Route::resource('clients', 'ClientController'); // name = (clients. index / create / show / update / destroy / edit
Route::resource('tasks', 'TaskController'); // name = (tasks. index / create / show / update / destroy / edit
Route::resource('payments', 'PaymentController'); // name = (payments. index / create / show / update / destroy / edit
Route::resource('credits', 'CreditController'); // name = (credits. index / create / show / update / destroy / edit
Route::resource('expenses', 'ExpenseController'); // name = (expenses. index / create / show / update / destroy / edit
Route::resource('user', 'UserProfileController'); // name = (clients. index / create / show / update / destroy / edit
Route::get('settings', 'SettingsController@index')->name('user.settings');
});
/*
* Inbound routes requiring DB Lookup
*/
Route::group(['middleware' => ['url-db']], function () {
Route::get('/user/confirm/{confirmation_code}', 'UserController@confirm');
});
/*
Authenticated Contact Routes
*/
Route::group(['prefix' => 'contact', 'middleware' => 'auth:contact'], function () {
Route::get('/', 'ContactController@index')->name('contact.dashboard');
Route::get('logout', 'Auth\ContactLoginController@logout')->name('contact.logout');
});
/*
* Injects users translation strings in json format for frontend consumption.
*/
Route::get('js/lang.js', 'TranslationController@index')->name('assets.lang');
/* Dev Playground
Route::get('/mailable', function () {
$user = App\Models\User::find(1);
return new App\Mail\VerifyUser($user);
});
*/