2016-09-01 16:23:39 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Web Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| This file is where you may define all of the routes that are handled
|
|
|
|
| by your application. Just tell Laravel the URIs it should respond
|
|
|
|
| to using a Closure or controller method. Build something great!
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
Auth::routes();
|
|
|
|
|
|
|
|
// Administration
|
|
|
|
Route::group(['prefix' => 'admin'], function () {
|
|
|
|
Route::get('/', 'Admin\DefaultController@index')->name('admin');
|
2016-09-05 15:28:56 +01:00
|
|
|
Route::post('settings/save', 'Admin\DefaultController@saveSettings')->name('admin.saveSettings');
|
2016-09-06 13:26:02 +01:00
|
|
|
Route::post('settings/test-email', 'Admin\DefaultController@testMailSettings')->name('admin.testMailSettings');
|
2016-09-05 15:28:56 +01:00
|
|
|
Route::get('settings', 'Admin\DefaultController@settings')->name('admin.settings');
|
2016-09-01 16:23:39 +01:00
|
|
|
|
2016-09-05 12:01:30 +01:00
|
|
|
// Album management
|
2016-10-28 05:30:57 +01:00
|
|
|
Route::get('albums/{id}/analyse/{queue_token}', 'Admin\AlbumController@analyse')->name('albums.analyse');
|
2016-09-01 16:23:39 +01:00
|
|
|
Route::get('albums/{id}/delete', 'Admin\AlbumController@delete')->name('albums.delete');
|
2017-02-16 17:32:01 +00:00
|
|
|
Route::post('albums/{id}/set-group-permissions', 'Admin\AlbumController@setGroupPermissions')->name('albums.set_group_permissions');
|
2017-03-21 21:48:55 +00:00
|
|
|
Route::post('albums/{id}/set-user-permissions', 'Admin\AlbumController@setUserPermissions')->name('albums.set_user_permissions');
|
2017-09-04 17:23:31 +01:00
|
|
|
Route::delete('albums/{id}/delete-redirect/{redirectId}', 'Admin\AlbumController@deleteRedirect')->name('albums.delete_redirect');
|
|
|
|
Route::post('albums/{id}/store-redirect', 'Admin\AlbumController@storeRedirect')->name('albums.store_redirect');
|
2016-09-01 16:23:39 +01:00
|
|
|
Route::resource('albums', 'Admin\AlbumController');
|
2016-09-05 12:01:30 +01:00
|
|
|
|
|
|
|
// Photo management
|
2016-10-28 05:30:57 +01:00
|
|
|
Route::post('photos/analyse/{id}/{queue_token}', 'Admin\PhotoController@analyse')->name('photos.analyse');
|
2016-10-03 15:57:58 +01:00
|
|
|
Route::post('photos/flip/{photoId}/{horizontal}/{vertical}', 'Admin\PhotoController@flip')->name('photos.flip');
|
2016-10-05 05:02:47 +01:00
|
|
|
Route::post('photos/move/{photoId}', 'Admin\PhotoController@move')->name('photos.move');
|
2016-10-05 05:35:14 +01:00
|
|
|
Route::post('photos/regenerate-thumbnails/{photoId}', 'Admin\PhotoController@regenerateThumbnails')->name('photos.regenerateThumbnails');
|
2016-09-08 23:22:29 +01:00
|
|
|
Route::post('photos/rotate/{photoId}/{angle}', 'Admin\PhotoController@rotate')->name('photos.rotate');
|
2016-09-05 12:56:13 +01:00
|
|
|
Route::post('photos/store-bulk', 'Admin\PhotoController@storeBulk')->name('photos.storeBulk');
|
2016-09-07 21:44:28 +01:00
|
|
|
Route::put('photos/update-bulk/{albumId}', 'Admin\PhotoController@updateBulk')->name('photos.updateBulk');
|
2016-09-02 21:27:50 +01:00
|
|
|
Route::resource('photos', 'Admin\PhotoController');
|
2016-09-24 09:34:08 +01:00
|
|
|
|
|
|
|
// Storage management
|
|
|
|
Route::get('storage/{id}/delete', 'Admin\StorageController@delete')->name('storage.delete');
|
|
|
|
Route::resource('storage', 'Admin\StorageController');
|
2016-10-01 15:24:22 +01:00
|
|
|
|
|
|
|
// User management
|
2017-02-13 10:36:53 +00:00
|
|
|
Route::get('users/{id}/delete', 'Admin\UserController@delete')->name('users.delete');
|
2017-03-21 21:48:55 +00:00
|
|
|
Route::get('users.json', 'Admin\UserController@searchJson')->name('users.searchJson');
|
2017-02-13 10:36:53 +00:00
|
|
|
Route::resource('users', 'Admin\UserController');
|
|
|
|
|
|
|
|
// Group management
|
2017-02-13 12:08:16 +00:00
|
|
|
Route::get('groups/{id}/delete', 'Admin\GroupController@delete')->name('groups.delete');
|
2017-02-13 10:36:53 +00:00
|
|
|
Route::resource('groups', 'Admin\GroupController');
|
2016-09-03 22:13:05 +01:00
|
|
|
});
|
|
|
|
|
2016-10-01 14:45:48 +01:00
|
|
|
// Installation
|
|
|
|
Route::group(['prefix' => 'install'], function () {
|
|
|
|
Route::get('/administrator', 'InstallController@administrator')->name('install.administrator');
|
|
|
|
Route::post('/administrator', 'InstallController@administrator')->name('install.administrator');
|
|
|
|
Route::get('/check', 'InstallController@check')->name('install.check');
|
|
|
|
Route::post('/check', 'InstallController@check')->name('install.check');
|
|
|
|
Route::get('/database', 'InstallController@database')->name('install.database');
|
|
|
|
Route::post('/database', 'InstallController@database')->name('install.database');
|
|
|
|
});
|
|
|
|
|
2016-09-03 22:13:05 +01:00
|
|
|
// Gallery
|
|
|
|
Route::get('/', 'Gallery\DefaultController@index')->name('home');
|
2016-09-06 14:19:16 +01:00
|
|
|
Route::get('/activate/{token}', 'Auth\ActivateController@activate')->name('auth.activate');
|
2017-04-10 21:04:10 +01:00
|
|
|
Route::get('/password/change', 'Auth\ChangePasswordController@showChangePasswordForm')->name('auth.changePassword');
|
2017-04-11 18:31:56 +01:00
|
|
|
Route::post('/password/change', 'Auth\ChangePasswordController@processChangePassword')->name('auth.processChangePassword');
|
2017-04-17 21:31:45 +01:00
|
|
|
Route::get('a/{albumUrlAlias}', 'Gallery\AlbumController@index')
|
|
|
|
->name('viewAlbum')
|
|
|
|
->where('albumUrlAlias', '.*');
|
|
|
|
Route::get('p/{albumUrlAlias}/{photoFilename}', 'Gallery\PhotoController@show')
|
|
|
|
->name('viewPhoto')
|
|
|
|
->where('albumUrlAlias', '.*');
|
|
|
|
Route::get('i/{albumUrlAlias}/{photoFilename}', 'Gallery\PhotoController@download')
|
|
|
|
->name('downloadPhoto')
|
|
|
|
->where('albumUrlAlias', '.*');
|