From 5b54f6d45fbe30eebf9c2c5db3b63a5ff2a1b7f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kv=C3=A1=C4=8Dek?= Date: Thu, 21 Jul 2016 23:47:19 +0200 Subject: [PATCH] FEATURE: install laravel-localization --- app/Http/Kernel.php | 21 +- app/Http/routes.php | 489 ++++++++++++++++++++++---------------------- composer.json | 3 +- composer.lock | 152 +++++++++----- config/app.php | 68 +++--- 5 files changed, 400 insertions(+), 333 deletions(-) diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index ae2615b5..15940382 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -3,6 +3,10 @@ namespace App\Http; use Illuminate\Foundation\Http\Kernel as HttpKernel; +use Illuminate\Routing\Middleware\ThrottleRequests; +use Mcamara\LaravelLocalization\Middleware\LaravelLocalizationRedirectFilter; +use Mcamara\LaravelLocalization\Middleware\LaravelLocalizationRoutes; +use Mcamara\LaravelLocalization\Middleware\LocaleSessionRedirect; class Kernel extends HttpKernel { @@ -23,11 +27,11 @@ class Kernel extends HttpKernel */ protected $middlewareGroups = [ 'web' => [ - \App\Http\Middleware\EncryptCookies::class, + Middleware\EncryptCookies::class, \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, \Illuminate\Session\Middleware\StartSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, - \App\Http\Middleware\VerifyCsrfToken::class, + Middleware\VerifyCsrfToken::class, ], 'api' => [ 'throttle:60,1', @@ -41,10 +45,13 @@ class Kernel extends HttpKernel * @var array */ protected $routeMiddleware = [ - 'auth' => \App\Http\Middleware\Authenticate::class, - 'onlyAdmin' => \App\Http\Middleware\RequireAdminRole::class, - 'adminMenu' => \App\Http\Middleware\AdminMenuRegistrator::class, - 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, - 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, + 'auth' => Middleware\Authenticate::class, + 'onlyAdmin' => Middleware\RequireAdminRole::class, + 'adminMenu' => Middleware\AdminMenuRegistrator::class, + 'guest' => Middleware\RedirectIfAuthenticated::class, + 'throttle' => ThrottleRequests::class, + 'localize' => LaravelLocalizationRoutes::class, + 'localizationRedirect' => LaravelLocalizationRedirectFilter::class, + 'localeSessionRedirect' => LocaleSessionRedirect::class ]; } diff --git a/app/Http/routes.php b/app/Http/routes.php index fb2fbe13..471f47b8 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -4,274 +4,281 @@ * This routing groups is used for routing along public part of website */ +use Mcamara\LaravelLocalization\Facades\LaravelLocalization; + Route::pattern('id', '\d+'); Route::pattern('url', '[0-9\-a-z]+'); /*******************************************************************************/ -/** - * This route group serves to handle request in admin - */ Route::group([ - 'middleware' => ['web', 'auth', 'adminMenu'], - 'namespace' => 'Admin', - 'prefix' => 'admin' + 'prefix' => LaravelLocalization::setLocale(), + 'middleware' => ['localeSessionRedirect', 'localizationRedirect'] ], function () { + /** + * This route group serves to handle request in admin + */ + Route::group([ + 'middleware' => ['web', 'auth', 'adminMenu'], + 'namespace' => 'Admin', + 'prefix' => 'admin' + ], function () { - // these routes are available only for user with role admin - Route::group(['middleware' => 'onlyAdmin'], function () { - // display form for creating new user - Route::get('users/new', 'CreateNewUser@getNewUser') - ->name('users.new'); + // these routes are available only for user with role admin + Route::group(['middleware' => 'onlyAdmin'], function () { + // display form for creating new user + Route::get('users/new', 'CreateNewUser@getNewUser') + ->name('users.new'); - // POST methods - // display form for creating new user - Route::post('users/new', 'CreateNewUser@postRegistration') - ->name('users.newPost'); + // POST methods + // display form for creating new user + Route::post('users/new', 'CreateNewUser@postRegistration') + ->name('users.newPost'); - // display form for edit of existing user - Route::get('users/edit/{id}', 'EditUser@getEditExistingUser') - ->name('users.edit'); + // display form for edit of existing user + Route::get('users/edit/{id}', 'EditUser@getEditExistingUser') + ->name('users.edit'); - // form for adding new custom field - Route::get('customfields/new', 'CreateNewCustomField@getNew') - ->name('customfields.new'); + // form for adding new custom field + Route::get('customfields/new', 'CreateNewCustomField@getNew') + ->name('customfields.new'); - // form for editing custom field - Route::get('customfields/edit/{id}', 'EditCustomField@getEditCustomField') - ->name('customfields.edit'); + // form for editing custom field + Route::get('customfields/edit/{id}', 'EditCustomField@getEditCustomField') + ->name('customfields.edit'); - // form for adding new custom field - Route::post('customfields/new', 'CreateNewCustomField@postNew') - ->name('customfields.newPost'); + // form for adding new custom field + Route::post('customfields/new', 'CreateNewCustomField@postNew') + ->name('customfields.newPost'); - // form for editing custom field - Route::post('customfields/edit/{id}', 'EditCustomField@postEditCustomField') - ->name('customfields.editPost'); + // form for editing custom field + Route::post('customfields/edit/{id}', 'EditCustomField@postEditCustomField') + ->name('customfields.editPost'); - Route::get('customfields/delete/{id}', 'EditCustomField@deleteCustomField') - ->name('customfields.delete'); + Route::get('customfields/delete/{id}', 'EditCustomField@deleteCustomField') + ->name('customfields.delete'); - Route::get('templates/overview/path/{id}', 'TemplateOverview@getPath') - ->name('templates.overview'); + Route::get('templates/overview/path/{id}', 'TemplateOverview@getPath') + ->name('templates.overview'); - Route::post('templates/copy', 'CopyTemplate@createCopy') - ->name('templates.postCopy'); + Route::post('templates/copy', 'CopyTemplate@createCopy') + ->name('templates.postCopy'); - // Route::get('templates/new/{pathId}', 'TemplateOverview@getPath') - // ->name('templates.new'); + // Route::get('templates/new/{pathId}', 'TemplateOverview@getPath') + // ->name('templates.new'); - Route::get('templates/edit/{id}', 'EditTemplate@getEdit') - ->name('templates.edit'); + Route::get('templates/edit/{id}', 'EditTemplate@getEdit') + ->name('templates.edit'); - Route::post('templates/edit/{id}', 'EditTemplate@postEdit') - ->name('templates.postEdit'); + Route::post('templates/edit/{id}', 'EditTemplate@postEdit') + ->name('templates.postEdit'); + }); + + // list of all static pages + Route::get('content/overview/{moduleId?}/{status?}', 'ContentOverview@getOverview') + ->name('content.overview'); + + // form for creating new static page + Route::get('content/new/{moduleId}', 'CreateNewContent@getNew') + ->name('content.new'); + + // form for editing existing static page + Route::get('content/edit/{id}', 'EditContent@getEdit') + ->name('content.edit'); + + // post method for creating new static page + Route::post('content/new/{moduleId}', 'CreateNewContent@postNew') + ->name('content.newPost'); + + // post method for creating new static page + Route::post('content/edit/{id}', 'EditContent@postEdit') + ->name('content.editPost'); + + // routes for quick actions + + // change status of page (protected, public or draft) + Route::get('content/status/{id}/{status}', 'EditContent@changeStatus') + ->name('content.changeStatus'); + + // set homepage + Route::get('content/homepage/{id}', 'EditContent@setHomepage') + ->name('content.setHomepage'); + + // delete page + Route::get('content/delete/{id}', 'EditContent@deletePage') + ->name('content.delete'); + + // these routes are available for all logged (authenticated) users + + // display dashboard with some usefull information + Route::get('/', 'Dashboard@getIndex') + ->name('admin.dashboard'); + + // display user detail in admin + Route::get('users/detail/{id?}', 'UserDetail@getDetail') + ->name('users.detail'); + + // method for saving edited data of user + Route::post('users/edit/{id}', 'EditUser@postEdit') + ->name('users.editPost'); + + // display list of all users registered into our system + Route::get('users/overview/{state?}/{perPage?}', 'UsersOverview@getOverview') + ->name('users.overview'); + + // history of changes for specified page + Route::get('history/{id}', 'History@getOverview') + ->name('content.history'); + + // history of changes for specified page + Route::get('history/{revision}/{id}', 'History@getDiff') + ->name('history.diff'); + + // list of all actions + Route::get('actions', 'ActionLogOverview@getOverview') + ->name('log.overview'); + + // routes for widget areas + Route::get('widgets/areas/overview', 'WidgetAreaOverview@getOverview') + ->name('widgetareas.overview'); + + // form for new widget area + Route::get('widgets/areas/new', 'CreateNewWidgetArea@getNew') + ->name('widgetareas.new'); + + // form for new widget area + Route::post('widgets/areas/new', 'CreateNewWidgetArea@postNew') + ->name('widgetareas.postNew'); + + // edit form for widget area + Route::get('widgets/areas/edit/{id}', 'EditWidgetArea@getEdit') + ->name('widgetareas.edit'); + + Route::post('widgets/areas/edit/{id}', 'EditWidgetArea@postEdit') + ->name('widgetareas.postEdit'); + + // edit form for widget area + Route::get('widgets/areas/delete/{id}', 'EditWidgetArea@deleteArea') + ->name('widgetareas.delete'); + + // list of all installed widget types + Route::get('widgets/overview', 'WidgetsOverview@getOverview') + ->name('widgets.overview'); + + // create new instance of widget of given type + Route::get('widgets/new/{type}', 'CreateNewWidget@getNew') + ->name('widgets.new'); + + Route::post('widgets/new/{type}', 'CreateNewWidget@postNew') + ->name('widgets.postNew'); + + // edit widget settings + Route::get('widgets/edit/{id}', 'EditWidget@getEdit') + ->name('widgets.edit'); + + Route::post('widgets/edit/{id}', 'EditWidget@postEdit') + ->name('widgets.postEdit'); + + // display form for association of widget and widget area + Route::get('widgets/associate/{widgetArea}', 'AssociateWidget@getList') + ->name('widgets.associate'); + + Route::get('widgets/deassociate/{widgetId}/{widgetArea}', 'AssociateWidget@deleteAssociation') + ->name('widgets.deleteAssociation'); + + Route::get('widgets/associate/{widgetId}/{widgetArea}', 'AssociateWidget@makeAssociation') + ->name('widgets.makeAssociation'); + + // uploader methods + Route::get('directories/new/{id?}', 'CreateNewDirectory@getNew') + ->name('upload.newDirectory'); + + Route::get('directories/edit/{id}', 'EditDirectory@getEdit') + ->name('upload.editDirectory'); + + Route::post('directories/edit/{id}', 'EditDirectory@postEdit') + ->name('upload.postEditDirectory'); + + Route::get('files/overview/{id?}/{type?}/{subtype?}', 'UploadedFilesOverview@getOverview') + ->name('upload.overview'); + + route::post('directories/new', 'CreateNewDirectory@postNew') + ->name('upload.postNewDirectory'); + + Route::get('upload/detail/{id}', 'EditUploadedFile@getDetail') + ->name('upload.detail'); + + Route::post('upload/detail/{id}', 'EditUploadedFile@postEdit') + ->name('upload.postEdit'); + + Route::get('upload/delete/{id}', 'EditUploadedFile@deleteFile') + ->name('upload.delete'); + + // uploader methods + Route::post('upload/file', 'UploadFile@postFile') + ->name('upload.postFile'); + + Route::post('upload/image', 'UploadFile@postImage') + ->name('upload.postImage'); + + // form with settings + Route::get('settings', 'Settings@getOverview') + ->name('settings.overview'); + + Route::post('settings', 'Settings@saveSettings') + ->name('settings.save'); + + Route::get('search', 'Search@getSearch') + ->name('search'); + + // custom fields + // ------------------------------ + + // list of all custom fields + Route::get('customfields/overview', 'CustomFieldsOverview@getOverview') + ->name('customfields.overview'); + + // logout method + Route::get('logout', function () { + + // remove user information + \Auth::logout(); + + // redirect to login form with info about successfull logout + return redirect() + ->route('login') + ->with('success', trans('admin/common.logoutSuccessfull')); + }) + ->name('logout'); }); - // list of all static pages - Route::get('content/overview/{moduleId?}/{status?}', 'ContentOverview@getOverview') - ->name('content.overview'); + /**************************************************************************************/ - // form for creating new static page - Route::get('content/new/{moduleId}', 'CreateNewContent@getNew') - ->name('content.new'); + /** + * This section must be specified as last one + */ - // form for editing existing static page - Route::get('content/edit/{id}', 'EditContent@getEdit') - ->name('content.edit'); + Route::group(['middleware' => ['web']], function () { - // post method for creating new static page - Route::post('content/new/{moduleId}', 'CreateNewContent@postNew') - ->name('content.newPost'); + Route::get('/', 'Visitor\Homepage@getIndex') + ->name('page.index'); - // post method for creating new static page - Route::post('content/edit/{id}', 'EditContent@postEdit') - ->name('content.editPost'); + // display login form + Route::get('admin/login', function () { + return view('admin.loginForm.form'); + }) + ->name('loginForm'); - // routes for quick actions + // handle login + Route::post('admin/login', 'Admin\Login@postLogin') + ->name('login'); - // change status of page (protected, public or draft) - Route::get('content/status/{id}/{status}', 'EditContent@changeStatus') - ->name('content.changeStatus'); + // route for sitemap + Route::get('sitemap.xml', 'Sitemap@getMap') + ->name('sitemap'); - // set homepage - Route::get('content/homepage/{id}', 'EditContent@setHomepage') - ->name('content.setHomepage'); - - // delete page - Route::get('content/delete/{id}', 'EditContent@deletePage') - ->name('content.delete'); - - // these routes are available for all logged (authenticated) users - - // display dashboard with some usefull information - Route::get('/', 'Dashboard@getIndex') - ->name('admin.dashboard'); - - // display user detail in admin - Route::get('users/detail/{id?}', 'UserDetail@getDetail') - ->name('users.detail'); - - // method for saving edited data of user - Route::post('users/edit/{id}', 'EditUser@postEdit') - ->name('users.editPost'); - - // display list of all users registered into our system - Route::get('users/overview/{state?}/{perPage?}', 'UsersOverview@getOverview') - ->name('users.overview'); - - // history of changes for specified page - Route::get('history/{id}', 'History@getOverview') - ->name('content.history'); - - // history of changes for specified page - Route::get('history/{revision}/{id}', 'History@getDiff') - ->name('history.diff'); - - // list of all actions - Route::get('actions', 'ActionLogOverview@getOverview') - ->name('log.overview'); - - // routes for widget areas - Route::get('widgets/areas/overview', 'WidgetAreaOverview@getOverview') - ->name('widgetareas.overview'); - - // form for new widget area - Route::get('widgets/areas/new', 'CreateNewWidgetArea@getNew') - ->name('widgetareas.new'); - - // form for new widget area - Route::post('widgets/areas/new', 'CreateNewWidgetArea@postNew') - ->name('widgetareas.postNew'); - - // edit form for widget area - Route::get('widgets/areas/edit/{id}', 'EditWidgetArea@getEdit') - ->name('widgetareas.edit'); - - Route::post('widgets/areas/edit/{id}', 'EditWidgetArea@postEdit') - ->name('widgetareas.postEdit'); - - // edit form for widget area - Route::get('widgets/areas/delete/{id}', 'EditWidgetArea@deleteArea') - ->name('widgetareas.delete'); - - // list of all installed widget types - Route::get('widgets/overview', 'WidgetsOverview@getOverview') - ->name('widgets.overview'); - - // create new instance of widget of given type - Route::get('widgets/new/{type}', 'CreateNewWidget@getNew') - ->name('widgets.new'); - - Route::post('widgets/new/{type}', 'CreateNewWidget@postNew') - ->name('widgets.postNew'); - - // edit widget settings - Route::get('widgets/edit/{id}', 'EditWidget@getEdit') - ->name('widgets.edit'); - - Route::post('widgets/edit/{id}', 'EditWidget@postEdit') - ->name('widgets.postEdit'); - - // display form for association of widget and widget area - Route::get('widgets/associate/{widgetArea}', 'AssociateWidget@getList') - ->name('widgets.associate'); - - Route::get('widgets/deassociate/{widgetId}/{widgetArea}', 'AssociateWidget@deleteAssociation') - ->name('widgets.deleteAssociation'); - - Route::get('widgets/associate/{widgetId}/{widgetArea}', 'AssociateWidget@makeAssociation') - ->name('widgets.makeAssociation'); - - // uploader methods - Route::get('directories/new/{id?}', 'CreateNewDirectory@getNew') - ->name('upload.newDirectory'); - - Route::get('directories/edit/{id}', 'EditDirectory@getEdit') - ->name('upload.editDirectory'); - - Route::post('directories/edit/{id}', 'EditDirectory@postEdit') - ->name('upload.postEditDirectory'); - - Route::get('files/overview/{id?}/{type?}/{subtype?}', 'UploadedFilesOverview@getOverview') - ->name('upload.overview'); - - route::post('directories/new', 'CreateNewDirectory@postNew') - ->name('upload.postNewDirectory'); - - Route::get('upload/detail/{id}', 'EditUploadedFile@getDetail') - ->name('upload.detail'); - - Route::post('upload/detail/{id}', 'EditUploadedFile@postEdit') - ->name('upload.postEdit'); - - Route::get('upload/delete/{id}', 'EditUploadedFile@deleteFile') - ->name('upload.delete'); - - // uploader methods - Route::post('upload/file', 'UploadFile@postFile') - ->name('upload.postFile'); - - Route::post('upload/image', 'UploadFile@postImage') - ->name('upload.postImage'); - - // form with settings - Route::get('settings', 'Settings@getOverview') - ->name('settings.overview'); - - Route::post('settings', 'Settings@saveSettings') - ->name('settings.save'); - - Route::get('search', 'Search@getSearch') - ->name('search'); - - // custom fields - // ------------------------------ - - // list of all custom fields - Route::get('customfields/overview', 'CustomFieldsOverview@getOverview') - ->name('customfields.overview'); - - // logout method - Route::get('logout', function () { - - // remove user information - \Auth::logout(); - - // redirect to login form with info about successfull logout - return redirect() - ->route('login') - ->with('success', trans('admin/common.logoutSuccessfull')); - }) - ->name('logout'); -}); - -/**************************************************************************************/ - -/** - * This section must be specified as last one - */ - -Route::group(['middleware' => ['web']], function () { - - Route::get('/', 'Visitor\Homepage@getIndex') - ->name('page.index'); - - // display login form - Route::get('admin/login', function () { - return view('admin.loginForm.form'); - }) - ->name('loginForm'); - - // handle login - Route::post('admin/login', 'Admin\Login@postLogin') - ->name('login'); - - // route for sitemap - Route::get('sitemap.xml', 'Sitemap@getMap') - ->name('sitemap'); - - // route for all content pages. This rule must be specified last (because it matches every route) - Route::get('{url}', 'Visitor\ContentPage@getPage') - ->name('page.content'); + // route for all content pages. This rule must be specified last (because it matches every route) + Route::get('{url}', 'Visitor\ContentPage@getPage') + ->name('page.content'); + }); }); \ No newline at end of file diff --git a/composer.json b/composer.json index 05841dde..d0811dcd 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,8 @@ "laravel/framework": "5.2.*", "pingpong/modules": "~2.0", "pingpong/menus": "^2.2", - "watson/sitemap": "^2.0" + "watson/sitemap": "^2.0", + "mcamara/laravel-localization": "^1.1" }, "require-dev": { "fzaninotto/faker": "~1.4", diff --git a/composer.lock b/composer.lock index 302bf315..85a75eeb 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "64dd6115505ac9f62926d5fccc14704d", - "content-hash": "8cefeb3bdf109c79d77ac6cb303a1a96", + "hash": "3a1cbb52ac8547058b740bac891b3b82", + "content-hash": "f274b2d31a4a37163ddd90984815797d", "packages": [ { "name": "classpreloader/classpreloader", @@ -104,7 +104,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/2e1b1f7597e2f647e99e96e747fcae9718ac817b", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/07a9af2d4de5f9ef0bf2d9ae94421e5fc50d7859", "reference": "07a9af2d4de5f9ef0bf2d9ae94421e5fc50d7859", "shasum": "" }, @@ -172,7 +172,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/4e3b8b9464d511eccbefe07cef94c275bce7e434", + "url": "https://api.github.com/repos/doctrine/cache/zipball/e0ef9e9833ca024d251e77e8d82a00ca92b0aa71", "reference": "e0ef9e9833ca024d251e77e8d82a00ca92b0aa71", "shasum": "" }, @@ -241,7 +241,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/collections/zipball/9f89fd349fd2b537be8a0a0c41f87f2f640dfc8a", + "url": "https://api.github.com/repos/doctrine/collections/zipball/866e100a425b8b73d15393fd081c6bf067f05bf9", "reference": "866e100a425b8b73d15393fd081c6bf067f05bf9", "shasum": "" }, @@ -380,7 +380,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/3df22ccdf20a68fafe34cb1ae452aee7cde7d442", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/61e1f860a304c3fb6961ecbec36927b5f20b71c6", "reference": "61e1f860a304c3fb6961ecbec36927b5f20b71c6", "shasum": "" }, @@ -800,7 +800,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/3d95b0328395b2682ac507a1c81bbeafab8b646b", + "url": "https://api.github.com/repos/laravel/framework/zipball/3f45e9b25bd9c01f6205da3e05ae6eea9b3f4a0e", "reference": "3f45e9b25bd9c01f6205da3e05ae6eea9b3f4a0e", "shasum": "" }, @@ -982,7 +982,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/a8294fb7d939433abfaeb0fc1a34a278acfa5b39", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/b334d6c5f95364948e06d2f620ab93d084074c6e", "reference": "b334d6c5f95364948e06d2f620ab93d084074c6e", "shasum": "" }, @@ -1055,6 +1055,54 @@ ], "time": "2016-03-07 21:01:43" }, + { + "name": "mcamara/laravel-localization", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/mcamara/laravel-localization.git", + "reference": "239d711d1f861e333e6de73d98dabdf94500512e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mcamara/laravel-localization/zipball/239d711d1f861e333e6de73d98dabdf94500512e", + "reference": "239d711d1f861e333e6de73d98dabdf94500512e", + "shasum": "" + }, + "require": { + "laravel/framework": "~5.2", + "php": ">=5.5.0" + }, + "require-dev": { + "orchestra/testbench": "3.2.*" + }, + "type": "library", + "autoload": { + "classmap": [], + "psr-0": { + "Mcamara\\LaravelLocalization": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marc Cámara", + "email": "mcamara88@gmail.com", + "role": "Developer" + } + ], + "description": "Easy localization for Laravel", + "homepage": "https://github.com/mcamara/laravel-localization", + "keywords": [ + "laravel", + "localization", + "php" + ], + "time": "2016-07-11 12:59:33" + }, { "name": "monolog/monolog", "version": "1.x-dev", @@ -1065,7 +1113,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/064b38c16790249488e7a8b987acf1c9d7383c09", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/5085630fd606c50d9b09efa0f93c0bdd83603d24", "reference": "5085630fd606c50d9b09efa0f93c0bdd83603d24", "shasum": "" }, @@ -1699,7 +1747,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/6b1175135bc2a74c08a28d89761272de8beed8cd", + "url": "https://api.github.com/repos/symfony/console/zipball/8412f1e1650c27758908c584f63f05bfba3f0314", "reference": "8412f1e1650c27758908c584f63f05bfba3f0314", "shasum": "" }, @@ -1759,7 +1807,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/a06d10888a45afd97534506afb058ec38d9ba35b", + "url": "https://api.github.com/repos/symfony/debug/zipball/b7a2a52278d62b0c5abfdd2e4bb3b55f2109c77f", "reference": "b7a2a52278d62b0c5abfdd2e4bb3b55f2109c77f", "shasum": "" }, @@ -1808,16 +1856,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "dev-master", + "version": "3.1.x-dev", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "1df0dbedb6d9407e5305afe7ca34bee0f2878407" + "reference": "c0c00c80b3a69132c4e55c3e7db32b4a387615e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/3433bfec93209ce539751591c3a1d9a1ac5ff53b", - "reference": "1df0dbedb6d9407e5305afe7ca34bee0f2878407", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/c0c00c80b3a69132c4e55c3e7db32b4a387615e5", + "reference": "c0c00c80b3a69132c4e55c3e7db32b4a387615e5", "shasum": "" }, "require": { @@ -1864,7 +1912,7 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2016-03-04 07:56:56" + "time": "2016-07-19 10:45:57" }, { "name": "symfony/finder", @@ -1876,7 +1924,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/c54e407b35bc098916704e9fd090da21da4c4f52", + "url": "https://api.github.com/repos/symfony/finder/zipball/623bda0abd9aa29e529c8e9c08b3b84171914723", "reference": "623bda0abd9aa29e529c8e9c08b3b84171914723", "shasum": "" }, @@ -1925,7 +1973,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/b508c1b4d86581ea2b577f067471333ce6b74221", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/8a7648cb85f12e707bab6b6f755ff5d108236023", "reference": "8a7648cb85f12e707bab6b6f755ff5d108236023", "shasum": "" }, @@ -1977,7 +2025,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/f7698089cb78b5f200263da8bd6dd7dfa219c114", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/c554014544e924e88b6d409e4b0d3b0f19f14d45", "reference": "c554014544e924e88b6d409e4b0d3b0f19f14d45", "shasum": "" }, @@ -2226,7 +2274,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/58c8a0217d8d02b902ed9a0f03913d1836db06e8", + "url": "https://api.github.com/repos/symfony/process/zipball/36c9f90f2e9f97ce8a0bdfbe2c230934d64087a1", "reference": "36c9f90f2e9f97ce8a0bdfbe2c230934d64087a1", "shasum": "" }, @@ -2275,7 +2323,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/0013248050fbd7d00ee90e7ea50c26ec425d666a", + "url": "https://api.github.com/repos/symfony/routing/zipball/fa1e9a8173cf0077dd995205da453eacd758fdf6", "reference": "fa1e9a8173cf0077dd995205da453eacd758fdf6", "shasum": "" }, @@ -2350,7 +2398,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/f7a07af51ea067745a521dab1e3152044a2fb1f2", + "url": "https://api.github.com/repos/symfony/translation/zipball/2de0b6f7ebe43cffd8a06996ebec6aab79ea9e91", "reference": "2de0b6f7ebe43cffd8a06996ebec6aab79ea9e91", "shasum": "" }, @@ -2414,7 +2462,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/140b51f11947ea959165fd4cae4e1946fa5aa5f0", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/9a6a883c48acb215d4825ce9de61dccf93d62074", "reference": "9a6a883c48acb215d4825ce9de61dccf93d62074", "shasum": "" }, @@ -2469,23 +2517,23 @@ }, { "name": "vlucas/phpdotenv", - "version": "dev-master", + "version": "2.2.x-dev", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "11a353b704488944a7477b229d119fe1cfa56f68" + "reference": "63f37b9395e8041cd4313129c08ece896d06ca8e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/11a353b704488944a7477b229d119fe1cfa56f68", - "reference": "11a353b704488944a7477b229d119fe1cfa56f68", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/63f37b9395e8041cd4313129c08ece896d06ca8e", + "reference": "63f37b9395e8041cd4313129c08ece896d06ca8e", "shasum": "" }, "require": { "php": ">=5.3.9" }, "require-dev": { - "phpunit/phpunit": "^4.8|^5.0" + "phpunit/phpunit": "^4.8 || ^5.0" }, "type": "library", "extra": { @@ -2510,13 +2558,12 @@ } ], "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", - "homepage": "http://github.com/vlucas/phpdotenv", "keywords": [ "dotenv", "env", "environment" ], - "time": "2016-02-11 08:44:10" + "time": "2016-04-15 10:48:49" }, { "name": "watson/sitemap", @@ -2630,7 +2677,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/416fb8ad1d095a87f1d21bc40711843cd122fd4a", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", "shasum": "" }, @@ -2684,7 +2731,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/684eab1624a66a4c37762c747c88a7f8664c65bf", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/86ec14457afce95c9ad57ee8394c57f57a1aaf43", "reference": "86ec14457afce95c9ad57ee8394c57f57a1aaf43", "shasum": "" }, @@ -2918,7 +2965,7 @@ ], "authors": [ { - "name": "Padraic Brady", + "name": "Pádraic Brady", "email": "padraic.brady@gmail.com", "homepage": "http://blog.astrumfutura.com" }, @@ -3211,17 +3258,20 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b" + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3e82f4e9fc92665fafd9157568e4dcb01d014e5b", - "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260", + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260", "shasum": "" }, "require": { "php": ">=5.3.3" }, + "require-dev": { + "phpunit/phpunit": "~4|~5" + }, "type": "library", "autoload": { "classmap": [ @@ -3244,7 +3294,7 @@ "keywords": [ "timer" ], - "time": "2015-06-21 08:01:12" + "time": "2016-05-12 18:03:57" }, { "name": "phpunit/php-token-stream", @@ -3305,7 +3355,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f9733ae34271bec6a6a6a1d4e9a8dd28f2ac1628", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/264188ddf4d3586c80ea615f8ec8eaea34e652a1", "reference": "264188ddf4d3586c80ea615f8ec8eaea34e652a1", "shasum": "" }, @@ -3541,23 +3591,23 @@ }, { "name": "sebastian/environment", - "version": "dev-master", + "version": "1.3.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "dc7a29032cf72b54f36dac15a1ca5b3a1b6029bf" + "reference": "622c5dc0a8036cfc4ccd73c7b1b668a431e69d96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/dc7a29032cf72b54f36dac15a1ca5b3a1b6029bf", - "reference": "dc7a29032cf72b54f36dac15a1ca5b3a1b6029bf", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/622c5dc0a8036cfc4ccd73c7b1b668a431e69d96", + "reference": "622c5dc0a8036cfc4ccd73c7b1b668a431e69d96", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3.3 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^4.8 || ^5.0" }, "type": "library", "extra": { @@ -3587,7 +3637,7 @@ "environment", "hhvm" ], - "time": "2016-02-26 18:40:46" + "time": "2016-06-11 08:21:19" }, { "name": "sebastian/exporter", @@ -3858,7 +3908,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/18a06d7a9af41718c20764a674a0ebba3bc40d1f", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/a5a2d27385655d34fd08557f8a315b6f27cbc5cf", "reference": "a5a2d27385655d34fd08557f8a315b6f27cbc5cf", "shasum": "" }, @@ -3906,16 +3956,16 @@ }, { "name": "symfony/yaml", - "version": "dev-master", + "version": "3.1.x-dev", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "801d412451594f7c9e7950a016a377798cf9dfa0" + "reference": "1819adf2066880c7967df7180f4f662b6f0567ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/407e31ad9742ace5c3d01642f02a3b2e6062bae5", - "reference": "801d412451594f7c9e7950a016a377798cf9dfa0", + "url": "https://api.github.com/repos/symfony/yaml/zipball/1819adf2066880c7967df7180f4f662b6f0567ac", + "reference": "1819adf2066880c7967df7180f4f662b6f0567ac", "shasum": "" }, "require": { @@ -3951,7 +4001,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2016-03-04 07:56:56" + "time": "2016-07-17 14:02:08" } ], "aliases": [], diff --git a/config/app.php b/config/app.php index ae9dec1b..7967bb14 100644 --- a/config/app.php +++ b/config/app.php @@ -149,6 +149,7 @@ return [ Illuminate\Translation\TranslationServiceProvider::class, Illuminate\Validation\ValidationServiceProvider::class, Illuminate\View\ViewServiceProvider::class, + Mcamara\LaravelLocalization\LaravelLocalizationServiceProvider::class, // this class must be before ModulesServiceProvider from PingPong, because it handles files module.json App\Providers\ModuleManager::class, Pingpong\Modules\ModulesServiceProvider::class, @@ -177,39 +178,40 @@ return [ 'aliases' => [ - 'App' => Illuminate\Support\Facades\App::class, - 'Artisan' => Illuminate\Support\Facades\Artisan::class, - 'Auth' => Illuminate\Support\Facades\Auth::class, - 'Blade' => Illuminate\Support\Facades\Blade::class, - 'Cache' => Illuminate\Support\Facades\Cache::class, - 'Config' => Illuminate\Support\Facades\Config::class, - 'Cookie' => Illuminate\Support\Facades\Cookie::class, - 'Crypt' => Illuminate\Support\Facades\Crypt::class, - 'DB' => Illuminate\Support\Facades\DB::class, - 'Eloquent' => Illuminate\Database\Eloquent\Model::class, - 'Event' => Illuminate\Support\Facades\Event::class, - 'File' => Illuminate\Support\Facades\File::class, - 'Gate' => Illuminate\Support\Facades\Gate::class, - 'Hash' => Illuminate\Support\Facades\Hash::class, - 'Lang' => Illuminate\Support\Facades\Lang::class, - 'Log' => Illuminate\Support\Facades\Log::class, - 'Mail' => Illuminate\Support\Facades\Mail::class, - 'Menu' => Pingpong\Menus\MenuFacade::class, - 'Module' => Pingpong\Modules\Facades\Module::class, - 'Password' => Illuminate\Support\Facades\Password::class, - 'Queue' => Illuminate\Support\Facades\Queue::class, - 'Redirect' => Illuminate\Support\Facades\Redirect::class, - 'Redis' => Illuminate\Support\Facades\Redis::class, - 'Request' => Illuminate\Support\Facades\Request::class, - 'Response' => Illuminate\Support\Facades\Response::class, - 'Route' => Illuminate\Support\Facades\Route::class, - 'Schema' => Illuminate\Support\Facades\Schema::class, - 'Session' => Illuminate\Support\Facades\Session::class, - 'Sitemap' => Watson\Sitemap\Facades\Sitemap::class, - 'Storage' => Illuminate\Support\Facades\Storage::class, - 'URL' => Illuminate\Support\Facades\URL::class, - 'Validator' => Illuminate\Support\Facades\Validator::class, - 'View' => Illuminate\Support\Facades\View::class, + 'App' => Illuminate\Support\Facades\App::class, + 'Artisan' => Illuminate\Support\Facades\Artisan::class, + 'Auth' => Illuminate\Support\Facades\Auth::class, + 'Blade' => Illuminate\Support\Facades\Blade::class, + 'Cache' => Illuminate\Support\Facades\Cache::class, + 'Config' => Illuminate\Support\Facades\Config::class, + 'Cookie' => Illuminate\Support\Facades\Cookie::class, + 'Crypt' => Illuminate\Support\Facades\Crypt::class, + 'DB' => Illuminate\Support\Facades\DB::class, + 'Eloquent' => Illuminate\Database\Eloquent\Model::class, + 'Event' => Illuminate\Support\Facades\Event::class, + 'File' => Illuminate\Support\Facades\File::class, + 'Gate' => Illuminate\Support\Facades\Gate::class, + 'Hash' => Illuminate\Support\Facades\Hash::class, + 'Lang' => Illuminate\Support\Facades\Lang::class, + 'Log' => Illuminate\Support\Facades\Log::class, + 'Mail' => Illuminate\Support\Facades\Mail::class, + 'Menu' => Pingpong\Menus\MenuFacade::class, + 'Module' => Pingpong\Modules\Facades\Module::class, + 'Password' => Illuminate\Support\Facades\Password::class, + 'Queue' => Illuminate\Support\Facades\Queue::class, + 'Redirect' => Illuminate\Support\Facades\Redirect::class, + 'Redis' => Illuminate\Support\Facades\Redis::class, + 'Request' => Illuminate\Support\Facades\Request::class, + 'Response' => Illuminate\Support\Facades\Response::class, + 'Route' => Illuminate\Support\Facades\Route::class, + 'Schema' => Illuminate\Support\Facades\Schema::class, + 'Session' => Illuminate\Support\Facades\Session::class, + 'Sitemap' => Watson\Sitemap\Facades\Sitemap::class, + 'Storage' => Illuminate\Support\Facades\Storage::class, + 'URL' => Illuminate\Support\Facades\URL::class, + 'Validator' => Illuminate\Support\Facades\Validator::class, + 'LaravelLocalization' => Mcamara\LaravelLocalization\Facades\LaravelLocalization::class, + 'View' => Illuminate\Support\Facades\View::class, ],