diff --git a/.gitignore b/.gitignore index a374dac7..b278165a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ /node_modules /public/storage +/storage/*.key /vendor /.idea Homestead.json diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 2abd9e04..75949531 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -21,7 +21,7 @@ class LoginController extends Controller use AuthenticatesUsers; /** - * Where to redirect users after login / registration. + * Where to redirect users after login. * * @var string */ diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 34c376cf..e48e2e3b 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -3,8 +3,8 @@ namespace App\Http\Controllers\Auth; use App\User; -use Validator; use App\Http\Controllers\Controller; +use Illuminate\Support\Facades\Validator; use Illuminate\Foundation\Auth\RegistersUsers; class RegisterController extends Controller diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php index c73bf99f..cf726eec 100644 --- a/app/Http/Controllers/Auth/ResetPasswordController.php +++ b/app/Http/Controllers/Auth/ResetPasswordController.php @@ -20,6 +20,13 @@ class ResetPasswordController extends Controller use ResetsPasswords; + /** + * Where to redirect users after resetting their password. + * + * @var string + */ + protected $redirectTo = '/home'; + /** * Create a new controller instance. * diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 7e6b14f8..87ffb05a 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -35,10 +35,10 @@ public function boot() */ public function map() { - $this->mapWebRoutes(); - $this->mapApiRoutes(); + $this->mapWebRoutes(); + // } diff --git a/config/app.php b/config/app.php index fb5ba390..717ee983 100644 --- a/config/app.php +++ b/config/app.php @@ -12,7 +12,7 @@ | any other location as required by the application or its packages. */ - 'name' => 'My Application', + 'name' => 'Laravel', /* |-------------------------------------------------------------------------- @@ -197,6 +197,7 @@ 'Artisan' => Illuminate\Support\Facades\Artisan::class, 'Auth' => Illuminate\Support\Facades\Auth::class, 'Blade' => Illuminate\Support\Facades\Blade::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, diff --git a/config/auth.php b/config/auth.php index a57bdc77..78175010 100644 --- a/config/auth.php +++ b/config/auth.php @@ -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. diff --git a/config/session.php b/config/session.php index ace3ef0e..e2779ad8 100644 --- a/config/session.php +++ b/config/session.php @@ -161,7 +161,7 @@ | */ - 'secure' => false, + 'secure' => env('SESSION_SECURE_COOKIE', false), /* |-------------------------------------------------------------------------- diff --git a/database/factories/ModelFactory.php b/database/factories/ModelFactory.php index 59951643..7926c794 100644 --- a/database/factories/ModelFactory.php +++ b/database/factories/ModelFactory.php @@ -11,12 +11,13 @@ | */ +/** @var \Illuminate\Database\Eloquent\Factory $factory */ $factory->define(App\User::class, function (Faker\Generator $faker) { static $password; return [ 'name' => $faker->name, - 'email' => $faker->safeEmail, + 'email' => $faker->unique()->safeEmail, 'password' => $password ?: $password = bcrypt('secret'), 'remember_token' => str_random(10), ]; diff --git a/database/migrations/.gitkeep b/database/migrations/.gitkeep deleted file mode 100644 index 8b137891..00000000 --- a/database/migrations/.gitkeep +++ /dev/null @@ -1 +0,0 @@ - diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php index 55574ee4..689cbeea 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -30,6 +30,6 @@ public function up() */ public function down() { - Schema::drop('users'); + Schema::dropIfExists('users'); } } 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 bda733da..1eefa405 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 @@ -27,6 +27,6 @@ public function up() */ public function down() { - Schema::drop('password_resets'); + Schema::dropIfExists('password_resets'); } } diff --git a/database/seeds/.gitkeep b/database/seeds/.gitkeep deleted file mode 100644 index 8b137891..00000000 --- a/database/seeds/.gitkeep +++ /dev/null @@ -1 +0,0 @@ - diff --git a/gulpfile.js b/gulpfile.js index 41d61cf8..8cf8c600 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,6 +1,6 @@ const elixir = require('laravel-elixir'); -require('laravel-elixir-vue'); +require('laravel-elixir-vue-2'); /* |-------------------------------------------------------------------------- diff --git a/package.json b/package.json index d490671c..58287379 100644 --- a/package.json +++ b/package.json @@ -8,11 +8,11 @@ "bootstrap-sass": "^3.3.7", "gulp": "^3.9.1", "jquery": "^3.1.0", - "laravel-elixir": "^6.0.0-9", - "laravel-elixir-vue": "^0.1.4", + "laravel-elixir": "^6.0.0-11", + "laravel-elixir-vue-2": "^0.2.0", "laravel-elixir-webpack-official": "^1.0.2", - "lodash": "^4.14.0", - "vue": "^1.0.26", - "vue-resource": "^0.9.3" + "lodash": "^4.16.2", + "vue": "^2.0.1", + "vue-resource": "^1.0.3" } } diff --git a/resources/assets/js/app.js b/resources/assets/js/app.js index 87dd5ad1..c63b3c33 100644 --- a/resources/assets/js/app.js +++ b/resources/assets/js/app.js @@ -9,12 +9,12 @@ require('./bootstrap'); /** * Next, we will create a fresh Vue application instance and attach it to - * the body of the page. From here, you may begin adding components to - * the application, or feel free to tweak this setup for your needs. + * the page. Then, you may begin adding components to this application + * or customize the JavaScript scaffolding to fit your unique needs. */ Vue.component('example', require('./components/Example.vue')); const app = new Vue({ - el: 'body' + el: '#app' }); diff --git a/resources/assets/js/bootstrap.js b/resources/assets/js/bootstrap.js index 3f4c5cf5..a2f3529f 100644 --- a/resources/assets/js/bootstrap.js +++ b/resources/assets/js/bootstrap.js @@ -26,7 +26,7 @@ require('vue-resource'); */ Vue.http.interceptors.push((request, next) => { - request.headers['X-CSRF-TOKEN'] = Laravel.csrfToken; + request.headers.set('X-CSRF-TOKEN', Laravel.csrfToken); next(); }); diff --git a/resources/assets/js/components/Example.vue b/resources/assets/js/components/Example.vue index 067ef661..86a0b70f 100644 --- a/resources/assets/js/components/Example.vue +++ b/resources/assets/js/components/Example.vue @@ -16,7 +16,7 @@