Make authentication
php artisan make:auth
Create the database (UTF8), modify .ENV file accordingly
CREATE SCHEMA `readxlsx4` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
In the config/database.php edit the mysql section (charset, collation, credentials)
'mysql' => [
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'collation' => 'utf8_general_ci',
]
Create default database tables to make authentication work
php artisan migrate
Disable user registration by adding in routes/web.php
Auth::routes(['verify' => true, 'register' => false]);
Create a new controller with model from the console
php artisan make:controller UploadXlsxController --model=UploadXlsx
Make certain routes available for logged in users and for guests
//routes/web.php
Route::group(['middleware' => ['auth']], function () {
//only authorized users can access these routes
});
Route::group(['middleware' => ['guest']], function () {
//only guests can access these routes
});