示例#1
0
Route::get('articles/{articles}/delete', 'articleController@destroy');
Route::get('attachments/{id}/delete', 'articleController@removeimg');
Route::get('top', 'articleController@top');
Route::get('about', 'articleController@about');
Route::get('about/artbio', 'articleController@artbio');
Route::get('about/exhibitions', 'articleController@exhibition');
Route::get('about/photobio', 'articleController@photobio');
Route::get('about/press', 'articleController@press');
Route::get('about/upcoming', 'articleController@upcoming');
Route::get('fashion', 'articleController@fashion');
Route::get('fashion/bespoke', 'articleController@bespoke');
Route::get('fashion/projects', 'articleController@projects');
Route::get('fashion/makingof', 'articleController@makingof');
Route::get('bodyart', 'articleController@bodyart');
Route::get('bodyart/popart', 'articleController@popart');
Route::get('bodyart/classic', 'articleController@classic');
Route::get('bodyart/body', 'articleController@body');
Route::get('bodyart/makingof', 'articleController@bodyartmakingof');
Route::get('photography', 'articleController@photography');
Route::get('photography/prowl', 'articleController@prowl');
Route::get('photography/landscape', 'articleController@landscape');
Route::get('photography/portrait', 'articleController@portrait');
Route::get('photography/nude', 'articleController@nude');
Route::get('photography/extra', 'articleController@extra');
Route::get('contact', 'articleController@contact');
Route::post('cat', 'CategoryController@store');
Route::post('contact', 'HomeController@contactSend');
Route::get('img/{path}', function (Illuminate\Http\Request $request) {
    $server = League\Glide\ServerFactory::create(['source' => '../storage/app/images', 'cache' => '../storage/app/images/.cache', 'base_url' => '/img/']);
    $server->outputImage($request);
})->where('path', '.+');
示例#2
0
 Route::get(config('bumble.admin.logout'), ['as' => 'bumble.logout', 'uses' => 'LoginController@getLogout']);
 Route::get(config('bumble.admin.forgot_password'), ['as' => 'bumble.forgot-password', 'uses' => 'LoginController@getForgotPassword']);
 Route::post(config('bumble.admin.forgot_password'), ['as' => 'bumble.forgot-password.post', 'uses' => 'LoginController@postForgotPassword']);
 Route::get(config('bumble.admin.reset_password') . '/{token}', ['as' => 'bumble.reset-password', 'uses' => 'LoginController@getReset']);
 Route::post(config('bumble.admin.reset_password'), ['as' => 'bumble.reset-password.post', 'uses' => 'LoginController@postReset']);
 // Image Cache Routes
 Route::get('cache/s3/{path?}', function ($path) {
     $client = S3Client::factory(array('key' => config('bumble.S3-key'), 'secret' => config('bumble.S3-secret')));
     // Setup Glide server
     $server = League\Glide\ServerFactory::create(['base_url' => config("bumble.admin_prefix") . '/cache/s3/', 'source' => new Filesystem(new AwsS3Adapter($client, config('bumble.bucket_name'))), 'cache' => public_path('cache')]);
     // Or better yet, output the image based on the current URL
     $server->outputImage($path, $_GET);
 })->where('path', '(.*)');
 Route::get('cache/{path?}', function ($path) {
     // Setup Glide server
     $server = League\Glide\ServerFactory::create(['base_url' => config("bumble.admin_prefix") . '/cache/', 'source' => public_path(), 'cache' => public_path('cache')]);
     // Or better yet, output the image based on the current URL
     $server->outputImage($path, $_GET);
 })->where('path', '(.*)');
 Route::group(['before' => 'bumble_auth'], function () {
     Route::get('/', ['as' => 'bumble_index', 'uses' => 'DashboardController@redirectToIndex']);
     Route::get(config('bumble.admin.dashboard'), ['as' => 'bumble.dashboard', 'uses' => 'DashboardController@getIndex']);
     $modelRepo = App::make('Monarkee\\Bumble\\Repositories\\ModelRepository');
     foreach ($modelRepo->getModels() as $model) {
         Route::resource(resource_name($model->getPluralSlug()), 'PostController', ['except' => ['show']]);
         if ($model->isSoftDeleting()) {
             Route::get(resource_name($model->getPluralSlug()) . '/trashed', ['as' => config('bumble.admin_prefix') . '.' . resource_name($model->getPluralSlug()) . '.trashed', 'uses' => 'PostController@trashed']);
             Route::put(resource_name($model->getPluralSlug()) . '/restore/{id}', ['as' => config('bumble.admin_prefix') . '.' . resource_name($model->getPluralSlug()) . '.restore', 'uses' => 'PostController@restore']);
             Route::delete(resource_name($model->getPluralSlug()) . '/annihilate/{id}', ['as' => config('bumble.admin_prefix') . '.' . resource_name($model->getPluralSlug()) . '.annihilate', 'uses' => 'PostController@annihilate']);
         }
     }
示例#3
0
Route::group(['middleware' => 'web'], function () {
    // Application routes
    Route::group(['namespace' => 'Application'], function () {
        Route::get('/', ['as' => 'root', 'uses' => 'MainController@index']);
        Route::get('no-transition', ['as' => 'root', 'uses' => 'MainController@index']);
        Route::get('home', ['as' => 'root', 'uses' => 'MainController@index']);
        Route::get('board', function () {
            return redirect(url('http://board.liverpoolthailand.com'));
        });
        Route::get('articles', ['as' => 'article', 'uses' => 'ArticleController@index']);
        Route::get('article/{article_slug}', ['as' => 'article.show', 'uses' => 'ArticleController@show']);
        Route::get('page/{page_slug}', ['as' => 'page', 'uses' => 'PageController@index']);
        Route::get('category/{category_slug}', ['as' => 'category', 'uses' => 'CategoryController@index']);
        Route::post('language/change', ['as' => 'app.language.change', 'uses' => 'LanguageController@postChange']);
        Route::get('assets/images/{source}/cache/{path}', function ($source, $path, Illuminate\Http\Request $request) {
            $server = League\Glide\ServerFactory::create(['source' => Storage::disk($source)->getDriver(), 'cache' => Storage::disk('local')->getDriver(), 'cache_path_prefix' => 'images/.cache', 'base_url' => 'assets/images/' . $source . '/cache']);
            $server->outputImage($path, $request->all());
        })->where('path', '.+');
    });
    // Auth routes
    Route::group(['namespace' => 'Auth'], function () {
        Route::group(['prefix' => 'auth'], function () {
            Route::get('/', ['as' => 'auth.root', 'uses' => 'AuthController@getLogin']);
            Route::get('login', ['as' => 'auth.login', 'uses' => 'AuthController@getLogin']);
            Route::post('login', ['as' => 'auth.login', 'uses' => 'AuthController@postLogin']);
            Route::get('logout', ['as' => 'auth.logout', 'uses' => 'AuthController@getLogout']);
        });
        Route::group(['prefix' => 'password'], function () {
            Route::get('email', ['as' => 'password.email', 'uses' => 'PasswordController@getEmail']);
            Route::post('email', ['as' => 'password.email', 'uses' => 'PasswordController@postEmail']);
            Route::get('reset/{token?}', ['as' => 'password.reset', 'uses' => 'PasswordController@showResetForm']);
示例#4
0
文件: glide.php 项目: Swader/nofw
<?php

return function () {
    $server = League\Glide\ServerFactory::create(['source' => new League\Flysystem\Filesystem(new League\Flysystem\Adapter\Local(__DIR__ . '/../assets/image')), 'cache' => new League\Flysystem\Filesystem(new League\Flysystem\Adapter\Local(__DIR__ . '/../public/static/image')), 'driver' => 'gd']);
    return $server;
};
示例#5
0
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::get('/', function () {
    return view('welcome');
});
Route::get('/a', 'abc@index');
Route::get('/b', 'abc@index2');
Route::post('/upload', 'uploadController@upload');
$server = League\Glide\ServerFactory::create(['source' => 'img/uploads', 'cache' => 'img/cache']);
Route::get('/abc/{id}', function ($id) use($server) {
    return $server->outputImage('1.jpg', ['w' => 700, 'h' => 100, 'gam' => 0, 'fit' => 'crop', 'con' => '0', 'sharp' => '0', 'blur' => '0', 'pixel' => '0', 'filt' => 'sepia', 'q' => '100', 'fm' => 'png']);
});
Route::get('/abc', 'imageController@view');
Route::get('/post', 'postController@create');
Route::get('/post/{id}', 'postController@show');
Route::get('identicon', 'identiconController@show');
Route::get('entrust', 'entrustController@index');
// Route::get('map', 'mapController@index');
Route::get('gmaps', 'mapController@gmaps');
Route::get('gmaps/data', 'mapController@data');
Route::get('registerblade', 'APIController@registerBlade');
Route::get('loginblade', 'APIController@loginBlade');
Route::group(['middleware' => ['cors'], 'prefix' => 'api'], function () {
    Route::post('register', 'APIController@register');