blue-twilight/routes/web.php

83 lines
4.0 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();
Route::get('/openstack-test', function ()
{
$credentials = new \Aws\Credentials\Credentials('vyUv2MDny84Q3VD6Zvg0', 'TuQSzRbx3f6Rmnnf_N4LXod5DCtgUfGwprot7UpQ');
$client = new \Aws\S3\S3Client(array(
'endpoint' => 'https://objects-us-west-1.dream.io',
'credentials' => $credentials,
'version' => 'latest',
'region' => 'xxx'
));
$blist = $client->listBuckets();
echo " Buckets belonging to " . $blist['Owner']['ID'] . ":\n";
foreach ($blist['Buckets'] as $b) {
echo "{$b['Name']}\t{$b['CreationDate']}\n";
}
});
// 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::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::resource('users', 'Admin\UserController');
// Group management
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('{albumUrlAlias}', 'Gallery\AlbumController@index')->name('viewAlbum');
Route::get('{albumUrlAlias}/{photoFilename}', 'Gallery\PhotoController@show')->name('viewPhoto');
Route::get('photo/{albumUrlAlias}/{photoFilename}', 'Gallery\PhotoController@download')->name('downloadPhoto');