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');
|
2017-10-01 16:48:50 +01:00
|
|
|
Route::get('/about', 'Admin\DefaultController@about')->name('admin.about');
|
|
|
|
Route::get('/about/latest-release', 'Admin\DefaultController@aboutLatestRelease')->name('admin.aboutLatestRelease');
|
2017-09-16 08:26:05 +01:00
|
|
|
Route::get('/photo-metadata', 'Admin\DefaultController@metadataUpgrade')->name('admin.metadataUpgrade');
|
2017-09-10 15:25:59 +01:00
|
|
|
Route::post('quick-upload', 'Admin\DefaultController@quickUpload')->name('admin.quickUpload');
|
2016-09-05 15:28:56 +01:00
|
|
|
Route::post('settings/save', 'Admin\DefaultController@saveSettings')->name('admin.saveSettings');
|
2018-09-14 11:02:08 +01:00
|
|
|
Route::post('settings/rebuild-permissions-cache', 'Admin\DefaultController@rebuildPermissionsCache')->name('admin.rebuildPermissionsCache');
|
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');
|
2017-09-10 17:02:15 +01:00
|
|
|
Route::post('statistics/save', 'Admin\StatisticsController@save')->name('admin.statistics.save');
|
2016-09-01 16:23:39 +01:00
|
|
|
|
2016-09-05 12:01:30 +01:00
|
|
|
// Album management
|
2018-09-23 10:28:54 +01:00
|
|
|
Route::get('albums/default-permissions', 'Admin\AlbumController@defaultPermissions')->name('albums.defaultPermissions');
|
|
|
|
Route::post('albums/set-default-group-permissions', 'Admin\AlbumController@setDefaultGroupPermissions')->name('albums.set_default_group_permissions');
|
|
|
|
Route::post('albums/set-default-user-permissions', 'Admin\AlbumController@setDefaultUserPermissions')->name('albums.set_default_user_permissions');
|
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-09-16 08:26:05 +01:00
|
|
|
Route::get('/albums/{id}/metadata', 'Admin\AlbumController@metadata')->name('albums.metadata');
|
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');
|
2017-09-17 16:04:07 +01:00
|
|
|
Route::post('photos/reanalyse/{id}/{queue_token}', 'Admin\PhotoController@reAnalyse')->name('photos.re-analyse');
|
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
|
|
|
|
2017-09-10 09:07:56 +01:00
|
|
|
// Label management
|
|
|
|
Route::get('labels/{id}/delete', 'Admin\LabelController@delete')->name('labels.delete');
|
|
|
|
Route::resource('labels', 'Admin\LabelController');
|
|
|
|
|
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');
|
2018-09-21 15:00:07 +01:00
|
|
|
|
|
|
|
// Comments management
|
2018-10-05 22:57:39 +01:00
|
|
|
Route::get('comments/{id}/approve', 'Admin\PhotoCommentController@approve')->name('comments.approve');
|
|
|
|
Route::post('comments/{id}/approve', 'Admin\PhotoCommentController@confirmApprove')->name('comments.confirmApprove');
|
|
|
|
|
|
|
|
Route::get('comments/{id}/reject', 'Admin\PhotoCommentController@reject')->name('comments.reject');
|
|
|
|
Route::post('comments/{id}/reject', 'Admin\PhotoCommentController@confirmReject')->name('comments.confirmReject');
|
|
|
|
|
2018-09-21 15:00:07 +01:00
|
|
|
Route::get('comments/{id}/delete', 'Admin\PhotoCommentController@delete')->name('comments.delete');
|
2018-10-05 22:57:39 +01:00
|
|
|
|
2018-10-05 22:17:41 +01:00
|
|
|
Route::post('comments/apply-bulk-action', 'Admin\PhotoCommentController@applyBulkAction')->name('comments.applyBulkAction');
|
2018-10-05 22:57:39 +01:00
|
|
|
Route::post('comments/bulk-action', 'Admin\PhotoCommentController@bulkAction')->name('comments.bulkAction');
|
2018-09-21 15:00:07 +01:00
|
|
|
Route::resource('comments', 'Admin\PhotoCommentController');
|
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');
|
|
|
|
});
|
|
|
|
|
2018-08-13 14:25:56 +01:00
|
|
|
// Social media SSO
|
|
|
|
Route::get('login/facebook', 'Auth\LoginController@redirectToFacebook')->name('login.facebook');
|
|
|
|
Route::get('login/facebook/callback', 'Auth\LoginController@handleFacebookCallback')->name('login_callback.facebook');
|
2018-08-17 13:37:58 +01:00
|
|
|
Route::get('login/google', 'Auth\LoginController@redirectToGoogle')->name('login.google');
|
|
|
|
Route::get('login/google/callback', 'Auth\LoginController@handleGoogleCallback')->name('login_callback.google');
|
2018-08-15 14:22:13 +01:00
|
|
|
Route::get('login/sso', 'Auth\LoginController@showLoginFormSso')->name('auth.login_sso');
|
2018-08-16 09:18:54 +01:00
|
|
|
Route::get('login/twitter', 'Auth\LoginController@redirectToTwitter')->name('login.twitter');
|
|
|
|
Route::get('login/twitter/callback', 'Auth\LoginController@handleTwitterCallback')->name('login_callback.twitter');
|
2018-08-15 14:22:13 +01:00
|
|
|
Route::get('register/sso', 'Auth\RegisterController@showRegistrationFormSso')->name('auth.register_sso');
|
2018-08-13 14:25:56 +01:00
|
|
|
|
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-09-10 13:21:45 +01:00
|
|
|
Route::get('/labels', 'Gallery\LabelController@index')->name('labels');
|
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-09-04 22:01:02 +01:00
|
|
|
Route::get('/sitemap.xml', 'Gallery\DefaultController@sitemapXml');
|
2017-09-06 16:08:38 +01:00
|
|
|
Route::get('/statistics', 'Gallery\StatisticsController@index')->name('statistics.index');
|
2017-09-06 22:00:12 +01:00
|
|
|
Route::get('/statistics/album-size-photo-count', 'Gallery\StatisticsController@albumSizeByPhotosChart')->name('statistics.albumSizePhotos');
|
|
|
|
Route::get('/statistics/album-size-photo-size', 'Gallery\StatisticsController@albumSizeByPhotoSizeChart')->name('statistics.albumSizePhotoSize');
|
2017-09-06 16:08:38 +01:00
|
|
|
Route::get('/statistics/cameras', 'Gallery\StatisticsController@camerasChart')->name('statistics.cameras');
|
2017-09-06 22:00:12 +01:00
|
|
|
Route::get('/statistics/file-sizes', 'Gallery\StatisticsController@fileSizeChart')->name('statistics.fileSizes');
|
2017-09-10 17:02:15 +01:00
|
|
|
Route::get('/statistics/photos-combined', 'Gallery\StatisticsController@photosCombined')->name('statistics.photosCombined');
|
2017-09-06 22:00:12 +01:00
|
|
|
Route::get('/statistics/taken-12m', 'Gallery\StatisticsController@photosTaken12Months')->name('statistics.taken12Months');
|
|
|
|
Route::get('/statistics/uploaded-12m', 'Gallery\StatisticsController@photosUploaded12Months')->name('statistics.uploaded12Months');
|
2017-04-17 21:31:45 +01:00
|
|
|
Route::get('a/{albumUrlAlias}', 'Gallery\AlbumController@index')
|
|
|
|
->name('viewAlbum')
|
|
|
|
->where('albumUrlAlias', '.*');
|
2017-09-16 08:26:05 +01:00
|
|
|
Route::get('exif/{albumUrlAlias}/{photoFilename}', 'Gallery\PhotoController@showExifData')
|
|
|
|
->name('viewExifData')
|
|
|
|
->where('albumUrlAlias', '.*');
|
2018-09-17 14:15:06 +01:00
|
|
|
Route::post('p/{albumUrlAlias}/{photoFilename}/comments', 'Gallery\PhotoCommentController@store')
|
|
|
|
->name('postPhotoComment')
|
|
|
|
->where('albumUrlAlias', '.*');
|
2018-09-19 19:54:59 +01:00
|
|
|
Route::post('p/{albumUrlAlias}/{photoFilename}/comments/moderate/{commentID}', 'Gallery\PhotoCommentController@moderate')
|
|
|
|
->name('moderatePhotoComment')
|
|
|
|
->where('albumUrlAlias', '.*');
|
2018-09-18 14:28:59 +01:00
|
|
|
Route::get('p/{albumUrlAlias}/{photoFilename}/comments/reply/{commentID}', 'Gallery\PhotoCommentController@reply')
|
|
|
|
->name('replyPhotoComment')
|
|
|
|
->where('albumUrlAlias', '.*');
|
2017-04-17 21:31:45 +01:00
|
|
|
Route::get('p/{albumUrlAlias}/{photoFilename}', 'Gallery\PhotoController@show')
|
|
|
|
->name('viewPhoto')
|
|
|
|
->where('albumUrlAlias', '.*');
|
|
|
|
Route::get('i/{albumUrlAlias}/{photoFilename}', 'Gallery\PhotoController@download')
|
|
|
|
->name('downloadPhoto')
|
2017-09-10 11:24:44 +01:00
|
|
|
->where('albumUrlAlias', '.*');
|
2017-09-10 13:21:45 +01:00
|
|
|
Route::get('label/{labelAlias}', 'Gallery\LabelController@show')
|
2017-09-10 11:24:44 +01:00
|
|
|
->name('viewLabel')
|
2018-07-16 06:04:44 +01:00
|
|
|
->where('labelAlias', '.*');
|
2018-10-09 22:16:43 +01:00
|
|
|
Route::get('u/{idOrAlias}/feed.json', 'Gallery\UserController@showFeedJson')
|
|
|
|
->name('viewUserFeedJson')
|
|
|
|
->where('idOrAlias', '.*');
|
2018-10-10 13:46:42 +01:00
|
|
|
Route::post('u/{idOrAlias}/follow', 'Gallery\UserController@followUser', ['middleware' => 'auth'])
|
|
|
|
->name('followUser')
|
|
|
|
->where('idOrAlias', '.*');
|
|
|
|
Route::post('u/{idOrAlias}/unfollow', 'Gallery\UserController@unFollowUser', ['middleware' => 'auth'])
|
|
|
|
->name('unFollowUser')
|
|
|
|
->where('idOrAlias', '.*');
|
2018-08-27 21:28:44 +01:00
|
|
|
Route::get('u/{idOrAlias}', 'Gallery\UserController@show')
|
2018-07-16 06:04:44 +01:00
|
|
|
->name('viewUser')
|
2018-08-27 21:28:44 +01:00
|
|
|
->where('idOrAlias', '.*');
|
2018-11-18 09:07:13 +00:00
|
|
|
Route::get('activity', 'Gallery\UserController@activityFeed')
|
2018-10-14 20:08:31 +01:00
|
|
|
->name('userActivityFeed')
|
|
|
|
->middleware('auth');
|
2018-11-18 09:07:13 +00:00
|
|
|
Route::get('activity.json', 'Gallery\UserController@activityFeedJson')
|
2018-10-14 20:08:31 +01:00
|
|
|
->name('userActivityFeedJson')
|
|
|
|
->middleware('auth');
|
2018-11-18 09:07:13 +00:00
|
|
|
Route::get('explore/users', 'Gallery\ExploreController@users')
|
|
|
|
->name('exploreUsers');
|
2018-09-12 17:08:27 +01:00
|
|
|
Route::get('me/confirm-email-change', 'Gallery\UserController@confirmEmailChangeState')
|
|
|
|
->name('userSettings.confirmEmailChangeState')
|
|
|
|
->middleware('auth');
|
|
|
|
Route::post('me/reset-email-change', 'Gallery\UserController@resetEmailChangeState')
|
|
|
|
->name('userSettings.resetEmailChangeState')
|
|
|
|
->middleware('auth');
|
2018-08-27 21:28:44 +01:00
|
|
|
Route::get('me/settings', 'Gallery\UserController@settings')
|
|
|
|
->name('userSettings')
|
|
|
|
->middleware('auth');
|
2018-09-07 10:05:38 +01:00
|
|
|
Route::post('me/save-settings', 'Gallery\UserController@saveSettings')
|
2018-08-27 21:28:44 +01:00
|
|
|
->name('saveUserSettings')
|
|
|
|
->middleware('auth');
|