Self-hosted PHP photo gallery - your photos, your website, your property! Built on Laravel and Bootstrap 4, Blue Twilight is a private alternative to Flickr and Instagram. https://showmy.photos
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

115 lines
7.0KB

  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | Web Routes
  5. |--------------------------------------------------------------------------
  6. |
  7. | This file is where you may define all of the routes that are handled
  8. | by your application. Just tell Laravel the URIs it should respond
  9. | to using a Closure or controller method. Build something great!
  10. |
  11. */
  12. Auth::routes();
  13. // Administration
  14. Route::group(['prefix' => 'admin'], function () {
  15. Route::get('/', 'Admin\DefaultController@index')->name('admin');
  16. Route::get('/about', 'Admin\DefaultController@about')->name('admin.about');
  17. Route::get('/about/latest-release', 'Admin\DefaultController@aboutLatestRelease')->name('admin.aboutLatestRelease');
  18. Route::get('/photo-metadata', 'Admin\DefaultController@metadataUpgrade')->name('admin.metadataUpgrade');
  19. Route::post('quick-upload', 'Admin\DefaultController@quickUpload')->name('admin.quickUpload');
  20. Route::post('settings/save', 'Admin\DefaultController@saveSettings')->name('admin.saveSettings');
  21. Route::post('settings/test-email', 'Admin\DefaultController@testMailSettings')->name('admin.testMailSettings');
  22. Route::get('settings', 'Admin\DefaultController@settings')->name('admin.settings');
  23. Route::post('statistics/save', 'Admin\StatisticsController@save')->name('admin.statistics.save');
  24. // Album management
  25. Route::get('albums/{id}/analyse/{queue_token}', 'Admin\AlbumController@analyse')->name('albums.analyse');
  26. Route::get('albums/{id}/delete', 'Admin\AlbumController@delete')->name('albums.delete');
  27. Route::get('/albums/{id}/metadata', 'Admin\AlbumController@metadata')->name('albums.metadata');
  28. Route::post('albums/{id}/set-group-permissions', 'Admin\AlbumController@setGroupPermissions')->name('albums.set_group_permissions');
  29. Route::post('albums/{id}/set-user-permissions', 'Admin\AlbumController@setUserPermissions')->name('albums.set_user_permissions');
  30. Route::delete('albums/{id}/delete-redirect/{redirectId}', 'Admin\AlbumController@deleteRedirect')->name('albums.delete_redirect');
  31. Route::post('albums/{id}/store-redirect', 'Admin\AlbumController@storeRedirect')->name('albums.store_redirect');
  32. Route::resource('albums', 'Admin\AlbumController');
  33. // Photo management
  34. Route::post('photos/analyse/{id}/{queue_token}', 'Admin\PhotoController@analyse')->name('photos.analyse');
  35. Route::post('photos/flip/{photoId}/{horizontal}/{vertical}', 'Admin\PhotoController@flip')->name('photos.flip');
  36. Route::post('photos/move/{photoId}', 'Admin\PhotoController@move')->name('photos.move');
  37. Route::post('photos/reanalyse/{id}/{queue_token}', 'Admin\PhotoController@reAnalyse')->name('photos.re-analyse');
  38. Route::post('photos/regenerate-thumbnails/{photoId}', 'Admin\PhotoController@regenerateThumbnails')->name('photos.regenerateThumbnails');
  39. Route::post('photos/rotate/{photoId}/{angle}', 'Admin\PhotoController@rotate')->name('photos.rotate');
  40. Route::post('photos/store-bulk', 'Admin\PhotoController@storeBulk')->name('photos.storeBulk');
  41. Route::put('photos/update-bulk/{albumId}', 'Admin\PhotoController@updateBulk')->name('photos.updateBulk');
  42. Route::resource('photos', 'Admin\PhotoController');
  43. // Label management
  44. Route::get('labels/{id}/delete', 'Admin\LabelController@delete')->name('labels.delete');
  45. Route::resource('labels', 'Admin\LabelController');
  46. // Storage management
  47. Route::get('storage/{id}/delete', 'Admin\StorageController@delete')->name('storage.delete');
  48. Route::resource('storage', 'Admin\StorageController');
  49. // User management
  50. Route::get('users/{id}/delete', 'Admin\UserController@delete')->name('users.delete');
  51. Route::get('users.json', 'Admin\UserController@searchJson')->name('users.searchJson');
  52. Route::resource('users', 'Admin\UserController');
  53. // Group management
  54. Route::get('groups/{id}/delete', 'Admin\GroupController@delete')->name('groups.delete');
  55. Route::resource('groups', 'Admin\GroupController');
  56. });
  57. // Installation
  58. Route::group(['prefix' => 'install'], function () {
  59. Route::get('/administrator', 'InstallController@administrator')->name('install.administrator');
  60. Route::post('/administrator', 'InstallController@administrator')->name('install.administrator');
  61. Route::get('/check', 'InstallController@check')->name('install.check');
  62. Route::post('/check', 'InstallController@check')->name('install.check');
  63. Route::get('/database', 'InstallController@database')->name('install.database');
  64. Route::post('/database', 'InstallController@database')->name('install.database');
  65. });
  66. // Gallery
  67. Route::get('/', 'Gallery\DefaultController@index')->name('home');
  68. Route::get('/activate/{token}', 'Auth\ActivateController@activate')->name('auth.activate');
  69. Route::get('/labels', 'Gallery\LabelController@index')->name('labels');
  70. Route::get('/password/change', 'Auth\ChangePasswordController@showChangePasswordForm')->name('auth.changePassword');
  71. Route::post('/password/change', 'Auth\ChangePasswordController@processChangePassword')->name('auth.processChangePassword');
  72. Route::get('/sitemap.xml', 'Gallery\DefaultController@sitemapXml');
  73. Route::get('/statistics', 'Gallery\StatisticsController@index')->name('statistics.index');
  74. Route::get('/statistics/album-size-photo-count', 'Gallery\StatisticsController@albumSizeByPhotosChart')->name('statistics.albumSizePhotos');
  75. Route::get('/statistics/album-size-photo-size', 'Gallery\StatisticsController@albumSizeByPhotoSizeChart')->name('statistics.albumSizePhotoSize');
  76. Route::get('/statistics/cameras', 'Gallery\StatisticsController@camerasChart')->name('statistics.cameras');
  77. Route::get('/statistics/file-sizes', 'Gallery\StatisticsController@fileSizeChart')->name('statistics.fileSizes');
  78. Route::get('/statistics/photos-combined', 'Gallery\StatisticsController@photosCombined')->name('statistics.photosCombined');
  79. Route::get('/statistics/taken-12m', 'Gallery\StatisticsController@photosTaken12Months')->name('statistics.taken12Months');
  80. Route::get('/statistics/uploaded-12m', 'Gallery\StatisticsController@photosUploaded12Months')->name('statistics.uploaded12Months');
  81. Route::get('a/{albumUrlAlias}', 'Gallery\AlbumController@index')
  82. ->name('viewAlbum')
  83. ->where('albumUrlAlias', '.*');
  84. Route::get('exif/{albumUrlAlias}/{photoFilename}', 'Gallery\PhotoController@showExifData')
  85. ->name('viewExifData')
  86. ->where('albumUrlAlias', '.*');
  87. Route::get('p/{albumUrlAlias}/{photoFilename}', 'Gallery\PhotoController@show')
  88. ->name('viewPhoto')
  89. ->where('albumUrlAlias', '.*');
  90. Route::get('i/{albumUrlAlias}/{photoFilename}', 'Gallery\PhotoController@download')
  91. ->name('downloadPhoto')
  92. ->where('albumUrlAlias', '.*');
  93. Route::get('label/{labelAlias}', 'Gallery\LabelController@show')
  94. ->name('viewLabel')
  95. ->where('labelAlias', '.*');
  96. Route::get('u/{idOrAlias}', 'Gallery\UserController@show')
  97. ->name('viewUser')
  98. ->where('idOrAlias', '.*');
  99. Route::get('me/settings', 'Gallery\UserController@settings')
  100. ->name('userSettings')
  101. ->middleware('auth');
  102. Route::get('me/save-settings', 'Gallery\UserController@saveSettings')
  103. ->name('saveUserSettings')
  104. ->middleware('auth');