Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rapid Authentication and Configuration in Laravel 5.4

I'm trying to add authentication to my Laravel project. My database configuration is:

'mysql' => [
    'driver' => 'mysql',
    'host' => env('DB_HOST', '127.0.0.1'),
    'port' => env('DB_PORT', '3306'),
    'database' => env('DB_DATABASE', 'forge'),
    'username' => env('DB_USERNAME', 'forge'),
    'password' => env('DB_PASSWORD', ''),
    'unix_socket' => env('DB_SOCKET', ''),
    'charset' => 'utf8mb4',
    'collation' => 'utf8mb4_unicode_ci',
    'prefix' => '',
    'strict' => true,
    'engine' => null,
],

And the .env file contains:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=example
DB_USERNAME=root
DB_PASSWORD=

When I try to register, this error happens:

Image of the error message

I'm using XAMPP and my phpMyAdmin table structure is shown in this picture:

Image of the users table structure

like image 970
Haniyeh Asemi Avatar asked Apr 17 '17 15:04

Haniyeh Asemi


1 Answers

Its because remember_token field is not allowing to store null.

so either you need to provide value for remember_token or allow remember_token to have null values.

like image 110
Bhaumik Pandhi Avatar answered Nov 05 '22 18:11

Bhaumik Pandhi