77 lines
4.2 KiB
PHP
77 lines
4.2 KiB
PHP
<?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');
|
|
Route::post('settings/save', 'Admin\DefaultController@saveSettings')->name('admin.saveSettings');
|
|
Route::post('settings/test-email', 'Admin\DefaultController@testMailSettings')->name('admin.testMailSettings');
|
|
Route::get('settings', 'Admin\DefaultController@settings')->name('admin.settings');
|
|
|
|
// Album management
|
|
Route::get('albums/{id}/analyse/{queue_token}', 'Admin\AlbumController@analyse')->name('albums.analyse');
|
|
Route::get('albums/{id}/delete', 'Admin\AlbumController@delete')->name('albums.delete');
|
|
Route::post('albums/{id}/set-group-permissions', 'Admin\AlbumController@setGroupPermissions')->name('albums.set_group_permissions');
|
|
Route::post('albums/{id}/set-user-permissions', 'Admin\AlbumController@setUserPermissions')->name('albums.set_user_permissions');
|
|
Route::resource('albums', 'Admin\AlbumController');
|
|
|
|
// Photo management
|
|
Route::post('photos/analyse/{id}/{queue_token}', 'Admin\PhotoController@analyse')->name('photos.analyse');
|
|
Route::post('photos/flip/{photoId}/{horizontal}/{vertical}', 'Admin\PhotoController@flip')->name('photos.flip');
|
|
Route::post('photos/move/{photoId}', 'Admin\PhotoController@move')->name('photos.move');
|
|
Route::post('photos/regenerate-thumbnails/{photoId}', 'Admin\PhotoController@regenerateThumbnails')->name('photos.regenerateThumbnails');
|
|
Route::post('photos/rotate/{photoId}/{angle}', 'Admin\PhotoController@rotate')->name('photos.rotate');
|
|
Route::post('photos/store-bulk', 'Admin\PhotoController@storeBulk')->name('photos.storeBulk');
|
|
Route::put('photos/update-bulk/{albumId}', 'Admin\PhotoController@updateBulk')->name('photos.updateBulk');
|
|
Route::resource('photos', 'Admin\PhotoController');
|
|
|
|
// Storage management
|
|
Route::get('storage/{id}/delete', 'Admin\StorageController@delete')->name('storage.delete');
|
|
Route::resource('storage', 'Admin\StorageController');
|
|
|
|
// User management
|
|
Route::get('users/{id}/delete', 'Admin\UserController@delete')->name('users.delete');
|
|
Route::get('users.json', 'Admin\UserController@searchJson')->name('users.searchJson');
|
|
Route::resource('users', 'Admin\UserController');
|
|
|
|
// Group management
|
|
Route::get('groups/{id}/delete', 'Admin\GroupController@delete')->name('groups.delete');
|
|
Route::resource('groups', 'Admin\GroupController');
|
|
});
|
|
|
|
// 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');
|
|
});
|
|
|
|
// Gallery
|
|
Route::get('/', 'Gallery\DefaultController@index')->name('home');
|
|
Route::get('/activate/{token}', 'Auth\ActivateController@activate')->name('auth.activate');
|
|
Route::get('/password/change', 'Auth\ChangePasswordController@showChangePasswordForm')->name('auth.changePassword');
|
|
Route::post('/password/change', 'Auth\ChangePasswordController@processChangePassword')->name('auth.processChangePassword');
|
|
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', '.*'); |