Commit f55d7a9c authored by Mubashar Abbas's avatar Mubashar Abbas
parents e7a111c1 3437566d
/node_modules /node_modules
/public/storage /public/storage
/storage/*.key
/vendor /vendor
/.idea /.idea
Homestead.json Homestead.json
......
...@@ -21,7 +21,7 @@ class LoginController extends Controller ...@@ -21,7 +21,7 @@ class LoginController extends Controller
use AuthenticatesUsers; use AuthenticatesUsers;
/** /**
* Where to redirect users after login / registration. * Where to redirect users after login.
* *
* @var string * @var string
*/ */
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
namespace App\Http\Controllers\Auth; namespace App\Http\Controllers\Auth;
use App\User; use App\User;
use Validator;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Validator;
use Illuminate\Foundation\Auth\RegistersUsers; use Illuminate\Foundation\Auth\RegistersUsers;
class RegisterController extends Controller class RegisterController extends Controller
......
...@@ -20,6 +20,13 @@ class ResetPasswordController extends Controller ...@@ -20,6 +20,13 @@ class ResetPasswordController extends Controller
use ResetsPasswords; use ResetsPasswords;
/**
* Where to redirect users after resetting their password.
*
* @var string
*/
protected $redirectTo = '/home';
/** /**
* Create a new controller instance. * Create a new controller instance.
* *
......
...@@ -35,10 +35,10 @@ class RouteServiceProvider extends ServiceProvider ...@@ -35,10 +35,10 @@ class RouteServiceProvider extends ServiceProvider
*/ */
public function map() public function map()
{ {
$this->mapWebRoutes();
$this->mapApiRoutes(); $this->mapApiRoutes();
$this->mapWebRoutes();
// //
} }
......
...@@ -12,7 +12,7 @@ return [ ...@@ -12,7 +12,7 @@ return [
| any other location as required by the application or its packages. | any other location as required by the application or its packages.
*/ */
'name' => 'My Application', 'name' => 'Laravel',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
...@@ -197,6 +197,7 @@ return [ ...@@ -197,6 +197,7 @@ return [
'Artisan' => Illuminate\Support\Facades\Artisan::class, 'Artisan' => Illuminate\Support\Facades\Artisan::class,
'Auth' => Illuminate\Support\Facades\Auth::class, 'Auth' => Illuminate\Support\Facades\Auth::class,
'Blade' => Illuminate\Support\Facades\Blade::class, 'Blade' => Illuminate\Support\Facades\Blade::class,
'Bus' => Illuminate\Support\Facades\Bus::class,
'Cache' => Illuminate\Support\Facades\Cache::class, 'Cache' => Illuminate\Support\Facades\Cache::class,
'Config' => Illuminate\Support\Facades\Config::class, 'Config' => Illuminate\Support\Facades\Config::class,
'Cookie' => Illuminate\Support\Facades\Cookie::class, 'Cookie' => Illuminate\Support\Facades\Cookie::class,
......
...@@ -81,10 +81,6 @@ return [ ...@@ -81,10 +81,6 @@ return [
| Resetting Passwords | 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 | 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 | than one user table or model in the application and you want to have
| separate password reset settings based on the specific user types. | separate password reset settings based on the specific user types.
......
...@@ -161,7 +161,7 @@ return [ ...@@ -161,7 +161,7 @@ return [
| |
*/ */
'secure' => false, 'secure' => env('SESSION_SECURE_COOKIE', false),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
......
...@@ -11,12 +11,13 @@ ...@@ -11,12 +11,13 @@
| |
*/ */
/** @var \Illuminate\Database\Eloquent\Factory $factory */
$factory->define(App\User::class, function (Faker\Generator $faker) { $factory->define(App\User::class, function (Faker\Generator $faker) {
static $password; static $password;
return [ return [
'name' => $faker->name, 'name' => $faker->name,
'email' => $faker->safeEmail, 'email' => $faker->unique()->safeEmail,
'password' => $password ?: $password = bcrypt('secret'), 'password' => $password ?: $password = bcrypt('secret'),
'remember_token' => str_random(10), 'remember_token' => str_random(10),
]; ];
......
...@@ -30,6 +30,6 @@ class CreateUsersTable extends Migration ...@@ -30,6 +30,6 @@ class CreateUsersTable extends Migration
*/ */
public function down() public function down()
{ {
Schema::drop('users'); Schema::dropIfExists('users');
} }
} }
...@@ -27,6 +27,6 @@ class CreatePasswordResetsTable extends Migration ...@@ -27,6 +27,6 @@ class CreatePasswordResetsTable extends Migration
*/ */
public function down() public function down()
{ {
Schema::drop('password_resets'); Schema::dropIfExists('password_resets');
} }
} }
const elixir = require('laravel-elixir'); const elixir = require('laravel-elixir');
require('laravel-elixir-vue'); require('laravel-elixir-vue-2');
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
......
...@@ -9,12 +9,12 @@ require('./bootstrap'); ...@@ -9,12 +9,12 @@ require('./bootstrap');
/** /**
* Next, we will create a fresh Vue application instance and attach it to * 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 page. Then, you may begin adding components to this application
* the application, or feel free to tweak this setup for your needs. * or customize the JavaScript scaffolding to fit your unique needs.
*/ */
Vue.component('example', require('./components/Example.vue')); Vue.component('example', require('./components/Example.vue'));
const app = new Vue({ const app = new Vue({
el: 'body' el: '#app'
}); });
...@@ -26,7 +26,7 @@ require('vue-resource'); ...@@ -26,7 +26,7 @@ require('vue-resource');
*/ */
Vue.http.interceptors.push((request, next) => { Vue.http.interceptors.push((request, next) => {
request.headers['X-CSRF-TOKEN'] = Laravel.csrfToken; request.headers.set('X-CSRF-TOKEN', Laravel.csrfToken);
next(); next();
}); });
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<script> <script>
export default { export default {
ready() { mounted() {
console.log('Component ready.') console.log('Component ready.')
} }
} }
......
...@@ -14,7 +14,7 @@ $brand-primary: #3097D1; ...@@ -14,7 +14,7 @@ $brand-primary: #3097D1;
$brand-info: #8eb4cb; $brand-info: #8eb4cb;
$brand-success: #2ab27b; $brand-success: #2ab27b;
$brand-warning: #cbb956; $brand-warning: #cbb956;
$brand-danger: #bf5329; $brand-danger: #bf5329;
// Typography // Typography
$font-family-sans-serif: "Raleway", sans-serif; $font-family-sans-serif: "Raleway", sans-serif;
......
...@@ -53,6 +53,7 @@ return [ ...@@ -53,6 +53,7 @@ return [
'array' => 'The :attribute may not have more than :max items.', 'array' => 'The :attribute may not have more than :max items.',
], ],
'mimes' => 'The :attribute must be a file of type: :values.', 'mimes' => 'The :attribute must be a file of type: :values.',
'mimetypes' => 'The :attribute must be a file of type: :values.',
'min' => [ 'min' => [
'numeric' => 'The :attribute must be at least :min.', 'numeric' => 'The :attribute must be at least :min.',
'file' => 'The :attribute must be at least :min kilobytes.', 'file' => 'The :attribute must be at least :min kilobytes.',
...@@ -80,6 +81,7 @@ return [ ...@@ -80,6 +81,7 @@ return [
'string' => 'The :attribute must be a string.', 'string' => 'The :attribute must be a string.',
'timezone' => 'The :attribute must be a valid zone.', 'timezone' => 'The :attribute must be a valid zone.',
'unique' => 'The :attribute has already been taken.', 'unique' => 'The :attribute has already been taken.',
'uploaded' => 'The :attribute failed to upload.',
'url' => 'The :attribute format is invalid.', 'url' => 'The :attribute format is invalid.',
/* /*
......
...@@ -68,8 +68,12 @@ ...@@ -68,8 +68,12 @@
<div class="flex-center position-ref full-height"> <div class="flex-center position-ref full-height">
@if (Route::has('login')) @if (Route::has('login'))
<div class="top-right links"> <div class="top-right links">
<a href="{{ url('/login') }}">Login</a> @if (Auth::check())
<a href="{{ url('/register') }}">Register</a> <a href="{{ url('/home') }}">Home</a>
@else
<a href="{{ url('/login') }}">Login</a>
<a href="{{ url('/register') }}">Register</a>
@endif
</div> </div>
@endif @endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment