Setting up and configuring the Auth library
To use Laravel's authentication system, we need to make sure it's set up correctly. In this recipe, we'll see a common way to accomplish the setup.
Getting ready
To set up the authentication, we just need to have Laravel installed and a MySQL instance running.
How to do it...
To complete this recipe, follow these steps:
Go into your
app/config/session.php
config file and make sure it's set to usenative
:'driver' => 'native'
The
app/config/auth.php
config file defaults should be fine but make sure they are set as follows:'driver' => 'eloquent', 'model' => 'User', 'table' => 'users',
In MySQL, create a database named as
authapp
and make sure the settings are correct in theapp/config/database.php
config file. The following are the settings that we'll be using:'default' => 'mysql', 'connections' => array( 'mysql' => array( 'driver' => 'mysql', 'host' => 'localhost', 'database' => 'authapp...