Skip to content

Commit

Permalink
laravel 5.4 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
neil-jennings committed Feb 16, 2017
1 parent 281bf53 commit de72eee
Show file tree
Hide file tree
Showing 45 changed files with 309 additions and 225 deletions.
10 changes: 5 additions & 5 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ APP_URL="http://localhost"
DB_CONNECTION="mysql"
DB_HOST="127.0.0.1"
DB_PORT=3306
DB_DATABASE="homestead"
DB_USERNAME="homestead"
DB_DATABASE="coaster_db"
DB_USERNAME="coaster_usr"
DB_PASSWORD="secret"
DB_PREFIX=

Expand All @@ -20,9 +20,9 @@ REDIS_HOST="127.0.0.1"
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER="smtp"
MAIL_HOST="mailtrap.io"
MAIL_PORT=2525
MAIL_DRIVER="sendmail"
MAIL_HOST=null
MAIL_PORT=25
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
Expand Down
6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

1 change: 1 addition & 0 deletions app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class Handler extends ExceptionHandler
\Illuminate\Auth\Access\AuthorizationException::class,
\Symfony\Component\HttpKernel\Exception\HttpException::class,
\Illuminate\Database\Eloquent\ModelNotFoundException::class,
\Illuminate\Session\TokenMismatchException::class,
\Illuminate\Validation\ValidationException::class,
];

Expand Down
3 changes: 3 additions & 0 deletions app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ class Kernel extends HttpKernel
*/
protected $middleware = [
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
];

/**
Expand Down
18 changes: 18 additions & 0 deletions app/Http/Middleware/TrimStrings.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace App\Http\Middleware;

use Illuminate\Foundation\Http\Middleware\TrimStrings as BaseTrimmer;

class TrimStrings extends BaseTrimmer
{
/**
* The names of the attributes that should not be trimmed.
*
* @var array
*/
protected $except = [
'password',
'password_confirmation',
];
}
1 change: 1 addition & 0 deletions app/Providers/BroadcastServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ public function boot()
{
Broadcast::routes();

require base_path('routes/channels.php');
}
}
24 changes: 9 additions & 15 deletions app/Providers/RouteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ public function boot()
*/
public function map()
{
$this->mapWebRoutes();

$this->mapApiRoutes();

$this->mapWebRoutes();

//
}

Expand All @@ -51,12 +51,9 @@ public function map()
*/
protected function mapWebRoutes()
{
Route::group([
'middleware' => 'web',
'namespace' => $this->namespace,
], function ($router) {
require base_path('routes/web.php');
});
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/web.php'));
}

/**
Expand All @@ -68,12 +65,9 @@ protected function mapWebRoutes()
*/
protected function mapApiRoutes()
{
Route::group([
'middleware' => ['api', 'auth:api'],
'namespace' => $this->namespace,
'prefix' => 'api',
], function ($router) {
require base_path('routes/api.php');
});
Route::prefix('api')
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
}
}
17 changes: 0 additions & 17 deletions bootstrap/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,3 @@
*/

require __DIR__.'/../vendor/autoload.php';

/*
|--------------------------------------------------------------------------
| Include The Compiled Class File
|--------------------------------------------------------------------------
|
| To dramatically increase your application's performance, you may use a
| compiled class file which contains all of the classes commonly used
| by a request. The Artisan "optimize" is used to create this file.
|
*/

$compiledPath = __DIR__.'/cache/compiled.php';

if (file_exists($compiledPath)) {
require $compiledPath;
}
31 changes: 24 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "web-feet/coastercms",
"description": "Coaster CMS",
"license": "GPLv3",
"keywords": ["coaster", "cms", "laravel"],
"type": "project",
"authors": [
{
Expand All @@ -15,11 +16,14 @@
],
"require": {
"php": ">=5.6.4",
"laravel/framework": "5.3.*",
"web-feet/coasterframework": "5.3.*"
"laravel/framework": "5.4.*",
"web-feet/coasterframework": "5.4.*"
},
"require-dev": {
"barryvdh/laravel-ide-helper": "^2.1"
"barryvdh/laravel-ide-helper": "^2.3",
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~5.7"
},
"autoload": {
"classmap": [
Expand All @@ -30,17 +34,30 @@
}
},
"autoload-dev": {
"classmap": []
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"post-update-cmd": [
"php vendor/web-feet/coasterframework/updateAssets"
"post-root-package-install": [
"php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan optimize",
"php vendor/web-feet/coasterframework/updateAssets"
],
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan optimize",
"php vendor/web-feet/coasterframework/updateAssets"
]
},
"config": {
"preferred-install": "dist"
"preferred-install": "dist",
"sort-packages": true
}
}
6 changes: 4 additions & 2 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
| any other location as required by the application or its packages.
*/

'name' => 'My Application',
'name' => 'Coaster CMS',

/*
|--------------------------------------------------------------------------
Expand Down Expand Up @@ -172,8 +172,8 @@
* Application Service Providers...
*/
App\Providers\AppServiceProvider::class,
// App\Providers\BroadcastServiceProvider::class,
App\Providers\AuthServiceProvider::class,
// App\Providers\BroadcastServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,

Expand All @@ -196,6 +196,8 @@
'Artisan' => Illuminate\Support\Facades\Artisan::class,
'Auth' => Illuminate\Support\Facades\Auth::class,
'Blade' => Illuminate\Support\Facades\Blade::class,
'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
'Bus' => Illuminate\Support\Facades\Bus::class,
'Cache' => Illuminate\Support\Facades\Cache::class,
'Config' => Illuminate\Support\Facades\Config::class,
'Cookie' => Illuminate\Support\Facades\Cookie::class,
Expand Down
4 changes: 0 additions & 4 deletions config/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@
| Resetting Passwords
|--------------------------------------------------------------------------
|
| Here you may set the options for resetting passwords including the view
| that is your password reset e-mail. You may also set the name of the
| table that maintains all of the reset tokens for your application.
|
| You may specify multiple password reset configurations if you have more
| than one user table or model in the application and you want to have
| separate password reset settings based on the specific user types.
Expand Down
4 changes: 2 additions & 2 deletions config/broadcasting.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@

'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_KEY'),
'secret' => env('PUSHER_SECRET'),
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
//
Expand Down
6 changes: 3 additions & 3 deletions config/cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@

'file' => [
'driver' => 'file',
'path' => storage_path('framework/cache'),
'path' => storage_path('framework/cache/data'),
],

'memcached' => [
'driver' => 'memcached',
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
'sasl' => [
'sasl' => [
env('MEMCACHED_USERNAME'),
env('MEMCACHED_PASSWORD'),
],
'options' => [
'options' => [
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
],
'servers' => [
Expand Down
35 changes: 0 additions & 35 deletions config/compile.php

This file was deleted.

25 changes: 6 additions & 19 deletions config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,6 @@

return [

/*
|--------------------------------------------------------------------------
| PDO Fetch Style
|--------------------------------------------------------------------------
|
| By default, database results will be returned as instances of the PHP
| stdClass object; however, you may desire to retrieve records in an
| array format for simplicity. Here you can tweak the fetch style.
|
*/

'fetch' => PDO::FETCH_OBJ,

/*
|--------------------------------------------------------------------------
| Default Database Connection Name
Expand Down Expand Up @@ -54,21 +41,21 @@

'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', 'localhost'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => env('DB_PREFIX', ''),
'strict' => true,
'engine' => null,
],

'pgsql' => [
'driver' => 'pgsql',
'host' => env('DB_HOST', 'localhost'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
Expand Down Expand Up @@ -107,10 +94,10 @@

'redis' => [

'cluster' => false,
'client' => 'predis',

'default' => [
'host' => env('REDIS_HOST', 'localhost'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => 0,
Expand Down
Loading

0 comments on commit de72eee

Please sign in to comment.