Skip to content

Commit f55d7a9

Browse files
committed
2 parents e7a111c + 3437566 commit f55d7a9

21 files changed

+39
-29
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/node_modules
22
/public/storage
3+
/storage/*.key
34
/vendor
45
/.idea
56
Homestead.json

app/Http/Controllers/Auth/LoginController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class LoginController extends Controller
2121
use AuthenticatesUsers;
2222

2323
/**
24-
* Where to redirect users after login / registration.
24+
* Where to redirect users after login.
2525
*
2626
* @var string
2727
*/

app/Http/Controllers/Auth/RegisterController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
namespace App\Http\Controllers\Auth;
44

55
use App\User;
6-
use Validator;
76
use App\Http\Controllers\Controller;
7+
use Illuminate\Support\Facades\Validator;
88
use Illuminate\Foundation\Auth\RegistersUsers;
99

1010
class RegisterController extends Controller

app/Http/Controllers/Auth/ResetPasswordController.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ class ResetPasswordController extends Controller
2020

2121
use ResetsPasswords;
2222

23+
/**
24+
* Where to redirect users after resetting their password.
25+
*
26+
* @var string
27+
*/
28+
protected $redirectTo = '/home';
29+
2330
/**
2431
* Create a new controller instance.
2532
*

app/Providers/RouteServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ public function boot()
3535
*/
3636
public function map()
3737
{
38-
$this->mapWebRoutes();
39-
4038
$this->mapApiRoutes();
4139

40+
$this->mapWebRoutes();
41+
4242
//
4343
}
4444

config/app.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
| any other location as required by the application or its packages.
1313
*/
1414

15-
'name' => 'My Application',
15+
'name' => 'Laravel',
1616

1717
/*
1818
|--------------------------------------------------------------------------
@@ -197,6 +197,7 @@
197197
'Artisan' => Illuminate\Support\Facades\Artisan::class,
198198
'Auth' => Illuminate\Support\Facades\Auth::class,
199199
'Blade' => Illuminate\Support\Facades\Blade::class,
200+
'Bus' => Illuminate\Support\Facades\Bus::class,
200201
'Cache' => Illuminate\Support\Facades\Cache::class,
201202
'Config' => Illuminate\Support\Facades\Config::class,
202203
'Cookie' => Illuminate\Support\Facades\Cookie::class,

config/auth.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,6 @@
8181
| Resetting Passwords
8282
|--------------------------------------------------------------------------
8383
|
84-
| Here you may set the options for resetting passwords including the view
85-
| that is your password reset e-mail. You may also set the name of the
86-
| table that maintains all of the reset tokens for your application.
87-
|
8884
| You may specify multiple password reset configurations if you have more
8985
| than one user table or model in the application and you want to have
9086
| separate password reset settings based on the specific user types.

config/session.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@
161161
|
162162
*/
163163

164-
'secure' => false,
164+
'secure' => env('SESSION_SECURE_COOKIE', false),
165165

166166
/*
167167
|--------------------------------------------------------------------------

database/factories/ModelFactory.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111
|
1212
*/
1313

14+
/** @var \Illuminate\Database\Eloquent\Factory $factory */
1415
$factory->define(App\User::class, function (Faker\Generator $faker) {
1516
static $password;
1617

1718
return [
1819
'name' => $faker->name,
19-
'email' => $faker->safeEmail,
20+
'email' => $faker->unique()->safeEmail,
2021
'password' => $password ?: $password = bcrypt('secret'),
2122
'remember_token' => str_random(10),
2223
];

database/migrations/.gitkeep

Lines changed: 0 additions & 1 deletion
This file was deleted.

database/migrations/2014_10_12_000000_create_users_table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ public function up()
3030
*/
3131
public function down()
3232
{
33-
Schema::drop('users');
33+
Schema::dropIfExists('users');
3434
}
3535
}

database/migrations/2014_10_12_100000_create_password_resets_table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ public function up()
2727
*/
2828
public function down()
2929
{
30-
Schema::drop('password_resets');
30+
Schema::dropIfExists('password_resets');
3131
}
3232
}

database/seeds/.gitkeep

Lines changed: 0 additions & 1 deletion
This file was deleted.

gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const elixir = require('laravel-elixir');
22

3-
require('laravel-elixir-vue');
3+
require('laravel-elixir-vue-2');
44

55
/*
66
|--------------------------------------------------------------------------

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
"bootstrap-sass": "^3.3.7",
99
"gulp": "^3.9.1",
1010
"jquery": "^3.1.0",
11-
"laravel-elixir": "^6.0.0-9",
12-
"laravel-elixir-vue": "^0.1.4",
11+
"laravel-elixir": "^6.0.0-11",
12+
"laravel-elixir-vue-2": "^0.2.0",
1313
"laravel-elixir-webpack-official": "^1.0.2",
14-
"lodash": "^4.14.0",
15-
"vue": "^1.0.26",
16-
"vue-resource": "^0.9.3"
14+
"lodash": "^4.16.2",
15+
"vue": "^2.0.1",
16+
"vue-resource": "^1.0.3"
1717
}
1818
}

resources/assets/js/app.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ require('./bootstrap');
99

1010
/**
1111
* Next, we will create a fresh Vue application instance and attach it to
12-
* the body of the page. From here, you may begin adding components to
13-
* the application, or feel free to tweak this setup for your needs.
12+
* the page. Then, you may begin adding components to this application
13+
* or customize the JavaScript scaffolding to fit your unique needs.
1414
*/
1515

1616
Vue.component('example', require('./components/Example.vue'));
1717

1818
const app = new Vue({
19-
el: 'body'
19+
el: '#app'
2020
});

resources/assets/js/bootstrap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ require('vue-resource');
2626
*/
2727

2828
Vue.http.interceptors.push((request, next) => {
29-
request.headers['X-CSRF-TOKEN'] = Laravel.csrfToken;
29+
request.headers.set('X-CSRF-TOKEN', Laravel.csrfToken);
3030

3131
next();
3232
});

resources/assets/js/components/Example.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
<script>
1818
export default {
19-
ready() {
19+
mounted() {
2020
console.log('Component ready.')
2121
}
2222
}

resources/assets/sass/variables.scss renamed to resources/assets/sass/_variables.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ $brand-primary: #3097D1;
1414
$brand-info: #8eb4cb;
1515
$brand-success: #2ab27b;
1616
$brand-warning: #cbb956;
17-
$brand-danger: #bf5329;
17+
$brand-danger: #bf5329;
1818

1919
// Typography
2020
$font-family-sans-serif: "Raleway", sans-serif;

resources/lang/en/validation.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
'array' => 'The :attribute may not have more than :max items.',
5454
],
5555
'mimes' => 'The :attribute must be a file of type: :values.',
56+
'mimetypes' => 'The :attribute must be a file of type: :values.',
5657
'min' => [
5758
'numeric' => 'The :attribute must be at least :min.',
5859
'file' => 'The :attribute must be at least :min kilobytes.',
@@ -80,6 +81,7 @@
8081
'string' => 'The :attribute must be a string.',
8182
'timezone' => 'The :attribute must be a valid zone.',
8283
'unique' => 'The :attribute has already been taken.',
84+
'uploaded' => 'The :attribute failed to upload.',
8385
'url' => 'The :attribute format is invalid.',
8486

8587
/*

resources/views/welcome.blade.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,12 @@
6868
<div class="flex-center position-ref full-height">
6969
@if (Route::has('login'))
7070
<div class="top-right links">
71-
<a href="{{ url('/login') }}">Login</a>
72-
<a href="{{ url('/register') }}">Register</a>
71+
@if (Auth::check())
72+
<a href="{{ url('/home') }}">Home</a>
73+
@else
74+
<a href="{{ url('/login') }}">Login</a>
75+
<a href="{{ url('/register') }}">Register</a>
76+
@endif
7377
</div>
7478
@endif
7579

0 commit comments

Comments
 (0)