Update to Laravel 5.2

This commit is contained in:
Dane Everitt 2016-01-11 22:04:11 -05:00
parent 02f6bf428e
commit a3eb4b7dc4
6 changed files with 114 additions and 50 deletions

23
.env.example Normal file
View file

@ -0,0 +1,23 @@
APP_ENV=local
APP_DEBUG=true
APP_KEY=SomeRandomString
DB_HOST=localhost
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
REDIS_HOST=localhost
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

View file

@ -10,6 +10,9 @@ use AccountNotFoundException;
use Illuminate\Database\Eloquent\ModelNotFoundException; use Illuminate\Database\Eloquent\ModelNotFoundException;
use Symfony\Component\HttpKernel\Exception\HttpException; use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Foundation\Validation\ValidationException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
class Handler extends ExceptionHandler class Handler extends ExceptionHandler
@ -22,6 +25,8 @@ class Handler extends ExceptionHandler
protected $dontReport = [ protected $dontReport = [
HttpException::class, HttpException::class,
ModelNotFoundException::class, ModelNotFoundException::class,
ValidationException::class,
AuthorizationException::class,
]; ];
/** /**

View file

@ -36,13 +36,6 @@ class AuthController extends Controller
*/ */
protected $redirectPath = '/'; protected $redirectPath = '/';
/**
* Failed post-authentication redirect location.
*
* @var string
*/
protected $loginPath = '/auth/login';
/** /**
* Lockout time for failed login requests. * Lockout time for failed login requests.
* *

View file

@ -6,7 +6,7 @@
"type": "project", "type": "project",
"require": { "require": {
"php": ">=5.5.9", "php": ">=5.5.9",
"laravel/framework": "5.1.*", "laravel/framework": "5.2.*",
"barryvdh/laravel-debugbar": "^2.0", "barryvdh/laravel-debugbar": "^2.0",
"doctrine/dbal": "^2.5", "doctrine/dbal": "^2.5",
"guzzlehttp/guzzle": "^6.1", "guzzlehttp/guzzle": "^6.1",
@ -20,7 +20,9 @@
"fzaninotto/faker": "~1.4", "fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*", "mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0", "phpunit/phpunit": "~4.0",
"phpspec/phpspec": "~2.1" "phpspec/phpspec": "~2.1",
"symfony/css-selector": "~3.0",
"symfony/dom-crawler": "~3.0"
}, },
"autoload": { "autoload": {
"classmap": [ "classmap": [
@ -40,8 +42,9 @@
"php artisan clear-compiled", "php artisan clear-compiled",
"php artisan optimize" "php artisan optimize"
], ],
"pre-update-cmd": [ "post-autoload-dump": [
"php artisan clear-compiled" "php artisan clear-compiled",
"php artisan optimize"
], ],
"post-update-cmd": [ "post-update-cmd": [
"php artisan optimize" "php artisan optimize"

View file

@ -2,6 +2,8 @@
return [ return [
'env' => env('APP_ENV', 'production'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Application Debug Mode | Application Debug Mode
@ -113,13 +115,11 @@ return [
/* /*
* Laravel Framework Service Providers... * Laravel Framework Service Providers...
*/ */
Illuminate\Foundation\Providers\ArtisanServiceProvider::class,
Illuminate\Auth\AuthServiceProvider::class, Illuminate\Auth\AuthServiceProvider::class,
Illuminate\Broadcasting\BroadcastServiceProvider::class, Illuminate\Broadcasting\BroadcastServiceProvider::class,
Illuminate\Bus\BusServiceProvider::class, Illuminate\Bus\BusServiceProvider::class,
Illuminate\Cache\CacheServiceProvider::class, Illuminate\Cache\CacheServiceProvider::class,
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
Illuminate\Routing\ControllerServiceProvider::class,
Illuminate\Cookie\CookieServiceProvider::class, Illuminate\Cookie\CookieServiceProvider::class,
Illuminate\Database\DatabaseServiceProvider::class, Illuminate\Database\DatabaseServiceProvider::class,
Illuminate\Encryption\EncryptionServiceProvider::class, Illuminate\Encryption\EncryptionServiceProvider::class,

View file

@ -4,64 +4,104 @@ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Default Authentication Driver | Authentication Defaults
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| This option controls the authentication driver that will be utilized. | This option controls the default authentication "guard" and password
| This driver manages the retrieval and authentication of the users | reset options for your application. You may change these defaults
| attempting to get access to protected areas of your application. | as required, but they're a perfect start for most applications.
|
*/
'defaults' => [
'guard' => 'web',
'passwords' => 'users',
],
/*
|--------------------------------------------------------------------------
| Authentication Guards
|--------------------------------------------------------------------------
|
| Next, you may define every authentication guard for your application.
| Of course, a great default configuration has been defined for you
| here which uses session storage and the Eloquent user provider.
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| Supported: "session", "token"
|
*/
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
'api' => [
'driver' => 'token',
'provider' => 'users',
],
],
/*
|--------------------------------------------------------------------------
| User Providers
|--------------------------------------------------------------------------
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| If you have multiple user tables or models you may configure multiple
| sources which represent each model / table. These sources may then
| be assigned to any extra authentication guards you have defined.
| |
| Supported: "database", "eloquent" | Supported: "database", "eloquent"
| |
*/ */
'providers' => [
'users' => [
'driver' => 'eloquent', 'driver' => 'eloquent',
/*
|--------------------------------------------------------------------------
| Authentication Model
|--------------------------------------------------------------------------
|
| When using the "Eloquent" authentication driver, we need to know which
| Eloquent model should be used to retrieve your users. Of course, it
| is often just the "User" model but you may use whatever you like.
|
*/
'model' => Pterodactyl\Models\User::class, 'model' => Pterodactyl\Models\User::class,
],
// 'users' => [
// 'driver' => 'database',
// 'table' => 'users',
// ],
],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Authentication Table | Resetting Passwords
|--------------------------------------------------------------------------
|
| When using the "Database" authentication driver, we need to know which
| table should be used to retrieve your users. We have chosen a basic
| default value but you may easily change it to any table you like.
|
*/
'table' => 'users',
/*
|--------------------------------------------------------------------------
| Password Reset Settings
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Here you may set the options for resetting passwords including the view | Here you may set the options for resetting passwords including the view
| that is your password reset e-mail. You can also set the name of the | 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. | 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.
|
| The expire time is the number of minutes that the reset token should be | The expire time is the number of minutes that the reset token should be
| considered valid. This security feature keeps tokens short-lived so | considered valid. This security feature keeps tokens short-lived so
| they have less time to be guessed. You may change this as needed. | they have less time to be guessed. You may change this as needed.
| |
*/ */
'password' => [ 'passwords' => [
'users' => [
'provider' => 'users',
'email' => 'emails.password', 'email' => 'emails.password',
'table' => 'password_resets', 'table' => 'password_resets',
'expire' => 60, 'expire' => 60,
], ],
],
]; ];