1
0
mirror of https://github.com/freescout-helpdesk/freescout.git synced 2024-11-25 03:43:33 +01:00
freescout/routes/web.php

95 lines
6.5 KiB
PHP
Raw Normal View History

2018-06-22 19:44:21 +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!
|
2018-07-25 16:09:20 +02:00
| Every time you change routes, run the following command to make them available in JS:
2018-08-31 18:17:38 +02:00
| php artisan freescout:build
2018-06-22 19:44:21 +02:00
*/
Auth::routes();
2018-08-10 16:28:35 +02:00
// Redirects
Route::redirect('/home', '/', 301);
2018-07-25 16:15:35 +02:00
// Public routes
2018-08-31 18:17:38 +02:00
Route::get('/user-setup/{hash}', 'PublicController@userSetup')->name('user_setup');
Route::post('/user-setup/{hash}', 'PublicController@userSetupSave');
2018-07-25 16:09:20 +02:00
2018-07-25 16:15:35 +02:00
// General routes for logged in users
2018-06-22 19:44:21 +02:00
Route::get('/', 'SecureController@dashboard')->name('dashboard');
2018-08-02 18:17:13 +02:00
Route::get('/logs/{name?}', ['uses' => 'SecureController@logs', 'middleware' => ['auth', 'roles'], 'roles' => ['admin']])->name('logs');
2018-08-24 14:24:11 +02:00
Route::post('/logs/{name?}', ['uses' => 'SecureController@logsSubmit', 'middleware' => ['auth', 'roles'], 'roles' => ['admin']]);
2018-06-22 19:44:21 +02:00
2018-08-29 16:20:25 +02:00
// Settings
2018-10-20 08:35:47 +02:00
Route::post('/app-settings/ajax', ['uses' => 'SettingsController@ajax', 'middleware' => ['auth', 'roles'], 'roles' => ['admin'], 'laroute' => true])->name('settings.ajax');
2018-08-30 10:48:42 +02:00
Route::get('/app-settings/{section?}', ['uses' => 'SettingsController@view', 'middleware' => ['auth', 'roles'], 'roles' => ['admin']])->name('settings');
Route::post('/app-settings/{section?}', ['uses' => 'SettingsController@save', 'middleware' => ['auth', 'roles'], 'roles' => ['admin']]);
2018-08-29 16:20:25 +02:00
2018-07-25 16:15:35 +02:00
// Users
2018-09-19 10:00:59 +02:00
Route::get('/users', ['uses' => 'UsersController@users', 'laroute' => true])->name('users');
2018-07-07 08:42:21 +02:00
Route::get('/users/wizard', 'UsersController@create')->name('users.create');
Route::post('/users/wizard', 'UsersController@createSave');
2018-06-24 11:01:26 +02:00
Route::get('/users/profile/{id}', 'UsersController@profile')->name('users.profile');
2018-06-26 11:43:11 +02:00
Route::post('/users/profile/{id}', 'UsersController@profileSave');
2018-07-04 13:52:25 +02:00
Route::post('/users/permissions/{id}', 'UsersController@permissionsSave');
Route::get('/users/permissions/{id}', 'UsersController@permissions')->name('users.permissions');
Route::post('/users/permissions/{id}', 'UsersController@permissionsSave');
2018-08-08 09:52:53 +02:00
Route::get('/users/notifications/{id}', 'UsersController@notifications')->name('users.notifications');
Route::post('/users/notifications/{id}', 'UsersController@notificationsSave');
2018-09-02 14:24:35 +02:00
Route::get('/users/password/{id}', 'UsersController@password')->name('users.password');
Route::post('/users/password/{id}', 'UsersController@passwordSave');
2018-08-31 18:17:38 +02:00
Route::post('/users/ajax', ['uses' => 'UsersController@ajax', 'laroute' => true])->name('users.ajax');
2018-06-26 11:43:11 +02:00
2018-07-27 15:19:25 +02:00
// Conversations
2018-09-14 10:24:04 +02:00
Route::get('/conversation/{id}', ['uses' => 'ConversationsController@view', 'laroute' => true])->name('conversations.view');
2018-07-30 17:11:35 +02:00
Route::post('/conversation/ajax', ['uses' => 'ConversationsController@ajax', 'laroute' => true])->name('conversations.ajax');
2018-08-15 08:10:05 +02:00
Route::post('/conversation/upload', ['uses' => 'ConversationsController@upload', 'laroute' => true])->name('conversations.upload');
2018-07-27 15:19:25 +02:00
Route::get('/mailbox/{mailbox_id}/new-ticket', 'ConversationsController@create')->name('conversations.create');
2018-09-14 10:24:04 +02:00
//Route::get('/conversation/draft/{id}', 'ConversationsController@draft')->name('conversations.draft');
2018-08-29 08:45:15 +02:00
Route::get('/conversation/ajax-html/{action}', ['uses' => 'ConversationsController@ajaxHtml', 'laroute' => true])->name('conversations.ajax_html');
2018-08-23 10:46:08 +02:00
Route::get('/search', 'ConversationsController@search')->name('conversations.search');
2018-09-16 12:52:52 +02:00
Route::get('/conversation/undo-reply/{thread_id}', 'ConversationsController@undoReply')->name('conversations.undo');
2018-07-27 15:19:25 +02:00
2018-07-25 16:15:35 +02:00
// Mailboxes
2018-10-31 07:14:59 +01:00
Route::get('/mailboxes', ['uses' => 'MailboxesController@mailboxes', 'laroute' => true])->name('mailboxes');
Route::get('/mailbox/new', 'MailboxesController@create')->name('mailboxes.create');
Route::post('/mailbox/new', 'MailboxesController@createSave');
Route::get('/mailbox/settings/{id}', 'MailboxesController@update')->name('mailboxes.update');
Route::post('/mailbox/settings/{id}', 'MailboxesController@updateSave');
Route::get('/mailbox/permissions/{id}', 'MailboxesController@permissions')->name('mailboxes.permissions');
Route::post('/mailbox/permissions/{id}', 'MailboxesController@permissionsSave');
2018-07-14 03:23:37 +02:00
Route::get('/mailbox/{id}', 'MailboxesController@view')->name('mailboxes.view');
Route::get('/mailbox/{id}/{folder_id}', 'MailboxesController@view')->name('mailboxes.view.folder');
2018-10-31 07:14:59 +01:00
Route::get('/mailbox/connection-settings/{id}/outgoing', 'MailboxesController@connectionOutgoing')->name('mailboxes.connection');
Route::post('/mailbox/connection-settings/{id}/outgoing', 'MailboxesController@connectionOutgoingSave');
Route::get('/mailbox/connection-settings/{id}/incoming', 'MailboxesController@connectionIncoming')->name('mailboxes.connection.incoming');
Route::post('/mailbox/connection-settings/{id}/incoming', 'MailboxesController@connectionIncomingSave');
Route::get('/mailbox/settings/{id}/auto-reply', 'MailboxesController@autoReply')->name('mailboxes.auto_reply');
Route::post('/mailbox/settings/{id}/auto-reply', 'MailboxesController@autoReplySave');
Route::post('/mailbox/ajax', ['uses' => 'MailboxesController@ajax', 'laroute' => true])->name('mailboxes.ajax');
2018-07-10 12:15:58 +02:00
2018-07-25 16:15:35 +02:00
// Customers
2018-07-10 12:15:58 +02:00
Route::get('/customer/{id}/edit', 'CustomersController@update')->name('customers.update');
Route::post('/customer/{id}/edit', 'CustomersController@updateSave');
2018-07-15 12:30:49 +02:00
Route::get('/customer/{id}/', 'CustomersController@conversations')->name('customers.conversations');
2018-09-26 12:14:54 +02:00
Route::get('/customer/ajax-search', ['uses' => 'CustomersController@ajaxSearch', 'laroute' => true])->name('customers.ajax_search');
// Translate
2018-10-23 17:02:59 +02:00
Route::post('/translations/send', ['uses' => 'TranslateController@postSend', 'middleware' => ['auth', 'roles'], 'roles' => ['admin']]);
2018-11-04 07:32:25 +01:00
// Modules
// There is a /public/modules folder, so route must have a different name
Route::get('/modules/list', ['uses' => 'ModulesController@modules', 'middleware' => ['auth', 'roles'], 'roles' => ['admin']])->name('modules');
2018-11-06 10:27:53 +01:00
Route::post('/modules/ajax', ['uses' => 'ModulesController@ajax', 'laroute' => true, 'middleware' => ['auth', 'roles'], 'roles' => ['admin']])->name('modules.ajax');
2018-11-04 07:32:25 +01:00
2018-10-23 17:02:59 +02:00
// System
Route::get('/system/status', ['uses' => 'SystemController@status', 'middleware' => ['auth', 'roles'], 'roles' => ['admin']])->name('system');
Route::get('/system/tools', ['uses' => 'SystemController@tools', 'middleware' => ['auth', 'roles'], 'roles' => ['admin']])->name('system.tools');
Route::post('/system/tools', ['uses' => 'SystemController@toolsExecute', 'middleware' => ['auth', 'roles'], 'roles' => ['admin']]);