More code for 5.3

This commit is contained in:
James Cole 2016-09-16 07:05:34 +02:00
parent d00fbe4eb3
commit 2f93784acd
7 changed files with 156 additions and 133 deletions

12
app/Providers/EventServiceProvider.php Normal file → Executable file
View File

@ -16,7 +16,6 @@ use FireflyIII\Models\PiggyBank;
use FireflyIII\Models\PiggyBankRepetition; use FireflyIII\Models\PiggyBankRepetition;
use FireflyIII\Models\Transaction; use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionJournal;
use Illuminate\Contracts\Events\Dispatcher as DispatcherContract;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use Log; use Log;
@ -73,17 +72,18 @@ class EventServiceProvider extends ServiceProvider
]; ];
/** /**
* Register any other events for your application. * Register any events for your application.
*
* @param \Illuminate\Contracts\Events\Dispatcher $events
* *
* @return void * @return void
*/ */
public function boot(DispatcherContract $events) public function boot()
{ {
parent::boot($events); parent::boot();
$this->registerDeleteEvents(); $this->registerDeleteEvents();
$this->registerCreateEvents(); $this->registerCreateEvents();
//
} }
/** /**

70
app/Providers/RouteServiceProvider.php Normal file → Executable file
View File

@ -1,28 +1,14 @@
<?php <?php
/**
* RouteServiceProvider.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Providers; namespace FireflyIII\Providers;
use Illuminate\Support\Facades\Route;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
use Illuminate\Routing\Router;
/**
* Class RouteServiceProvider
*
* @package FireflyIII\Providers
*/
class RouteServiceProvider extends ServiceProvider class RouteServiceProvider extends ServiceProvider
{ {
/** /**
* This namespace is applied to the controller routes in your routes file. * This namespace is applied to your controller routes.
* *
* In addition, it is set as the URL generator's root namespace. * In addition, it is set as the URL generator's root namespace.
* *
@ -33,31 +19,61 @@ class RouteServiceProvider extends ServiceProvider
/** /**
* Define your route model bindings, pattern filters, etc. * Define your route model bindings, pattern filters, etc.
* *
* @param \Illuminate\Routing\Router $router
*
* @return void * @return void
*/ */
public function boot(Router $router) public function boot()
{ {
// //
parent::boot($router); parent::boot();
} }
/** /**
* Define the routes for the application. * Define the routes for the application.
* *
* @param \Illuminate\Routing\Router $router * @return void
*/
public function map()
{
$this->mapWebRoutes();
$this->mapApiRoutes();
//
}
/**
* Define the "web" routes for the application.
*
* These routes all receive session state, CSRF protection, etc.
* *
* @return void * @return void
*/ */
public function map(Router $router) protected function mapWebRoutes()
{ {
$router->group( Route::group([
['namespace' => $this->namespace], function (Router $router) { 'middleware' => 'web',
/** @noinspection PhpIncludeInspection */ 'namespace' => $this->namespace,
require app_path('Http/routes.php'); ], function ($router) {
require base_path('routes/web.php');
});
} }
);
/**
* Define the "api" routes for the application.
*
* These routes are typically stateless.
*
* @return void
*/
protected function mapApiRoutes()
{
Route::group([
'middleware' => 'api',
'namespace' => $this->namespace,
'prefix' => 'api',
], function ($router) {
require base_path('routes/api.php');
});
} }
} }

2
resources/lang/en_US/pagination.php Normal file → Executable file
View File

@ -8,6 +8,8 @@
*/ */
return [ return [
'previous' => '&laquo; Previous', 'previous' => '&laquo; Previous',
'next' => 'Next &raquo;', 'next' => 'Next &raquo;',
]; ];

0
resources/lang/en_US/passwords.php Normal file → Executable file
View File

View File

@ -77,4 +77,9 @@ return [
'url' => 'The :attribute format is invalid.', 'url' => 'The :attribute format is invalid.',
'timezone' => 'The :attribute must be a valid zone.', 'timezone' => 'The :attribute must be a valid zone.',
'2fa_code' => 'The :attribute field is invalid.', '2fa_code' => 'The :attribute field is invalid.',
'dimensions' => 'The :attribute has invalid image dimensions.',
'distinct' => 'The :attribute field has a duplicate value.',
'file' => 'The :attribute must be a file.',
'in_array' => 'The :attribute field does not exist in :other.',
'present' => 'The :attribute field must be present.',
]; ];