Have you tried any instead of match. It's worked pretty well for me.
Laravel 5.4 routing issue with database based session
Previously we are using file based session and project is working fine.
From last 2 days i am trying to change file based session to database session and below steps are followed:
1.Created session table
CREATE TABLE sessions (
id int(11) NOT NULL,
user_id int(11) DEFAULT NULL,
ip_address varchar(45) DEFAULT NULL,
user_agent text,
payload text NOT NULL,
last_activity int(11) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB;
-
Then run below commands: php artisan session:table php artisan migrate
-
In config/session.php file 'driver' => env('SESSION_DRIVER', 'database')
-
In .env file SESSION_DRIVER=database
-
Cleared config,cache and route php artisan config:clear php artisan route:clear php artisan cache:clear
But i am facing issue with routes, on form submit method is POST but still in Request getting as GET and in web.php “Route::match(['get', 'post'],'/test', 'Quote@car');”
I wanted to setup database session for the laravel 5.4 project
Please help me with this isssue.
Used Session::save(); to persist session and its working for me
Please or to participate in this conversation.