Create Scaffold with Laravel 5.7 — Authentication (Part 1)

Alfredo Barron
Sep 20, 2018 · 3 min read

We will create a scaffold with Laravel 5.7 to using like base for our future projects. The first step is learning to create a authentication system.

Table of Contents

Install Laravel Application

First step open your terminal and typing the next command:

laravel new laravel-scaffold

Install Laravel Authentication

Enter to folder project an run the next command:

cd laravel-scaffold
php artisan make:auth

Create DB

Run the next commands:

mysql -u{user} -p{password}
mysql> create database laravel-scaffold;

Configure DB

Edit .env file

nano .env

Into .env file fill the data base vars


Create tables

Run the next command:

php artisan migrate

Generate User Table Seed

Create UsersTableSeeder.php with the next command:

php artisan make:seeder UsersTableSeeder

Into UsersTableSeeder.php file write the next code:


use Illuminate\Database\Seeder;

class UsersTableSeeder extends Seeder
* Run the database seeds.
* @return void
public function run()
factory(App\User::class, 50)->create();

Add UsersTableSeeder.php seeder to DatabaseSeeder.php

<?phpuse Illuminate\Database\Seeder;class DatabaseSeeder extends Seeder
* Seed the application's database.
* @return void
public function run()

Run seed

php artisan db:seed

Install Vuejs Frontend

Run the next command:

npm install

Add Browsersync Reloading into webpack.mix.js file

mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css')

Finally Compiling Assets (Laravel Mix) with the next commans:

npm run dev
// or
npm run watch

Now we have the next screen when enter the http://localhost:3000 route in browser





Tutorials for Developers Laravel/AWS/Linux

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store