diff --git a/.env.example b/.env.example index 251aeb94..668c06f0 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,4 @@ +APP_NAME=Laravel APP_ENV=local APP_KEY= APP_DEBUG=true @@ -21,7 +22,7 @@ REDIS_PASSWORD=null REDIS_PORT=6379 MAIL_DRIVER=smtp -MAIL_HOST=mailtrap.io +MAIL_HOST=smtp.mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=null MAIL_PASSWORD=null diff --git a/.gitattributes b/.gitattributes index a8763f8e..967315dd 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,5 @@ * text=auto *.css linguist-vendored *.scss linguist-vendored +*.js linguist-vendored +CHANGELOG.md export-ignore diff --git a/.gitignore b/.gitignore index b278165a..7deb0000 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,10 @@ /node_modules +/public/hot /public/storage /storage/*.key /vendor /.idea +/.vagrant Homestead.json Homestead.yaml .env diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..86c095e5 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,15 @@ +# Release Notes + +## v5.4.16 (2017-03-17) + +### Added +- Added `unix_socket` to `mysql` in `config/database.php` ()[#4179](https://github.com/laravel/laravel/pull/4179)) +- Added Pusher example code to `bootstrap.js` ([31c2623](https://github.com/laravel/laravel/commit/31c262301899b6cd1a4ce2631ad0e313b444b131)) + +### Changed +- Use `smtp.mailtrap.io` as default `MAIL_HOST` ([#4182](https://github.com/laravel/laravel/pull/4182)) +- Use `resource_path()` in `config/view.php` ([#4165](https://github.com/laravel/laravel/pull/4165)) +- Use `cross-env` binary ([#4167](https://github.com/laravel/laravel/pull/4167)) + +### Removed +- Remove index from password reset `token` column ([#4180](https://github.com/laravel/laravel/pull/4180)) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 21c9784c..a747e31b 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -60,6 +60,6 @@ class Handler extends ExceptionHandler return response()->json(['error' => 'Unauthenticated.'], 401); } - return redirect()->guest('login'); + return redirect()->guest(route('login')); } } diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index a182657e..fca6152c 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -13,7 +13,7 @@ class EventServiceProvider extends ServiceProvider * @var array */ protected $listen = [ - 'App\Events\SomeEvent' => [ + 'App\Events\Event' => [ 'App\Listeners\EventListener', ], ]; diff --git a/bootstrap/autoload.php b/bootstrap/autoload.php index 38301379..94adc997 100644 --- a/bootstrap/autoload.php +++ b/bootstrap/autoload.php @@ -15,20 +15,3 @@ define('LARAVEL_START', microtime(true)); */ 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; -} diff --git a/composer.json b/composer.json index 78354e16..91b6e51a 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,11 @@ "database" ], "psr-4": { - "App\\": "app/", + "App\\": "app/" + } + }, + "autoload-dev": { + "psr-4": { "Tests\\": "tests/" } }, @@ -42,8 +46,7 @@ }, "config": { "preferred-install": "dist", - "sort-packages": true - }, - "minimum-stability": "dev", - "prefer-stable": true + "sort-packages": true, + "optimize-autoloader": true + } } diff --git a/config/app.php b/config/app.php index 3036ac7c..135e9778 100644 --- a/config/app.php +++ b/config/app.php @@ -12,7 +12,7 @@ return [ | any other location as required by the application or its packages. */ - 'name' => 'Laravel', + 'name' => env('APP_NAME', 'Laravel'), /* |-------------------------------------------------------------------------- diff --git a/config/database.php b/config/database.php index df36b2dd..a196943f 100644 --- a/config/database.php +++ b/config/database.php @@ -46,6 +46,7 @@ return [ 'database' => env('DB_DATABASE', 'forge'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), + 'unix_socket' => env('DB_SOCKET', ''), 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'prefix' => '', diff --git a/config/mail.php b/config/mail.php index 68ed285d..bb92224c 100644 --- a/config/mail.php +++ b/config/mail.php @@ -88,6 +88,19 @@ return [ 'password' => env('MAIL_PASSWORD'), + /* + |-------------------------------------------------------------------------- + | Sendmail System Path + |-------------------------------------------------------------------------- + | + | When using the "sendmail" driver to send e-mails, we will need to know + | the path to where Sendmail lives on this server. A default path has + | been provided here, which will work well on most of your systems. + | + */ + + 'sendmail' => '/usr/sbin/sendmail -bs', + /* |-------------------------------------------------------------------------- | Markdown Mail Settings diff --git a/config/view.php b/config/view.php index e193ab61..2acfd9cc 100644 --- a/config/view.php +++ b/config/view.php @@ -14,7 +14,7 @@ return [ */ 'paths' => [ - realpath(base_path('resources/views')), + resource_path('views'), ], /* diff --git a/database/migrations/2014_10_12_100000_create_password_resets_table.php b/database/migrations/2014_10_12_100000_create_password_resets_table.php index 1eefa405..0d5cb845 100644 --- a/database/migrations/2014_10_12_100000_create_password_resets_table.php +++ b/database/migrations/2014_10_12_100000_create_password_resets_table.php @@ -15,7 +15,7 @@ class CreatePasswordResetsTable extends Migration { Schema::create('password_resets', function (Blueprint $table) { $table->string('email')->index(); - $table->string('token')->index(); + $table->string('token'); $table->timestamp('created_at')->nullable(); }); } diff --git a/package.json b/package.json index 194b47c8..83294b63 100644 --- a/package.json +++ b/package.json @@ -1,17 +1,21 @@ { "private": true, "scripts": { - "dev": "cross-env NODE_ENV=development webpack --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", - "watch": "cross-env NODE_ENV=development webpack --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", - "hot": "cross-env NODE_ENV=development webpack-dev-server --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", - "production": "cross-env NODE_ENV=production webpack --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" + "dev": "npm run development", + "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", + "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", + "watch-poll": "npm run watch -- --watch-poll", + "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", + "prod": "npm run production", + "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" }, "devDependencies": { - "axios": "^0.15.2", + "axios": "^0.15.3", "bootstrap-sass": "^3.3.7", - "jquery": "^3.1.0", - "laravel-mix": "^0.5.0", - "lodash": "^4.16.2", - "vue": "^2.0.1" + "cross-env": "^3.2.3", + "jquery": "^3.1.1", + "laravel-mix": "0.*", + "lodash": "^4.17.4", + "vue": "^2.1.10" } } diff --git a/public/index.php b/public/index.php index 716731f8..1e1d775f 100644 --- a/public/index.php +++ b/public/index.php @@ -15,7 +15,7 @@ | Composer provides a convenient, automatically generated class loader for | our application. We just need to utilize it! We'll simply require it | into the script here so that we don't have to worry about manual -| loading any of our classes later on. It feels nice to relax. +| loading any of our classes later on. It feels great to relax. | */ diff --git a/readme.md b/readme.md index 70f23e0b..336ce592 100644 --- a/readme.md +++ b/readme.md @@ -27,6 +27,17 @@ Laravel has the most extensive and thorough documentation and video tutorial lib If you're not in the mood to read, [Laracasts](https://laracasts.com) contains over 900 video tutorials on a range of topics including Laravel, modern PHP, unit testing, JavaScript, and more. Boost the skill level of yourself and your entire team by digging into our comprehensive video library. +## Laravel Sponsors + +We would like to extend our thanks to the following sponsors for helping fund on-going Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](http://patreon.com/taylorotwell): + +- **[Vehikl](http://vehikl.com)** +- **[Tighten Co.](https://tighten.co)** +- **[British Software Development](https://www.britishsoftware.co)** +- **[Styde](https://styde.net)** +- **[Codecourse](https://www.codecourse.com)** +- [Fragrantica](https://www.fragrantica.com) + ## Contributing Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](http://laravel.com/docs/contributions). diff --git a/resources/assets/js/bootstrap.js b/resources/assets/js/bootstrap.js index 4e8b9586..86574839 100644 --- a/resources/assets/js/bootstrap.js +++ b/resources/assets/js/bootstrap.js @@ -27,9 +27,8 @@ window.Vue = require('vue'); window.axios = require('axios'); -window.axios.defaults.headers.common = { - 'X-Requested-With': 'XMLHttpRequest' -}; +window.axios.defaults.headers.common['X-CSRF-TOKEN'] = window.Laravel.csrfToken; +window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; /** * Echo exposes an expressive API for subscribing to channels and listening @@ -37,7 +36,9 @@ window.axios.defaults.headers.common = { * allows your team to easily build robust real-time web applications. */ -// import Echo from "laravel-echo" +// import Echo from 'laravel-echo' + +// window.Pusher = require('pusher-js'); // window.Echo = new Echo({ // broadcaster: 'pusher', diff --git a/resources/assets/sass/_variables.scss b/resources/assets/sass/_variables.scss index 0a2bc731..53202ac1 100644 --- a/resources/assets/sass/_variables.scss +++ b/resources/assets/sass/_variables.scss @@ -17,6 +17,7 @@ $brand-warning: #cbb956; $brand-danger: #bf5329; // Typography +$icon-font-path: "~bootstrap-sass/assets/fonts/bootstrap/"; $font-family-sans-serif: "Raleway", sans-serif; $font-size-base: 14px; $line-height-base: 1.6; diff --git a/resources/lang/en/validation.php b/resources/lang/en/validation.php index 9608bc25..2a5c7434 100644 --- a/resources/lang/en/validation.php +++ b/resources/lang/en/validation.php @@ -41,7 +41,7 @@ return [ 'email' => 'The :attribute must be a valid email address.', 'exists' => 'The selected :attribute is invalid.', 'file' => 'The :attribute must be a file.', - 'filled' => 'The :attribute field is required.', + 'filled' => 'The :attribute field must have a value.', 'image' => 'The :attribute must be an image.', 'in' => 'The selected :attribute is invalid.', 'in_array' => 'The :attribute field does not exist in :other.', diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index d6760370..44b7e721 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -1,5 +1,5 @@ - +
diff --git a/storage/framework/testing/.gitignore b/storage/framework/testing/.gitignore new file mode 100644 index 00000000..d6b7ef32 --- /dev/null +++ b/storage/framework/testing/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore