Laravel force logout user

Laravel force logout user Add force_logout column in users table. Create ForceLogout Middleware in app/Http/Middleware/ForceLogout.php Open up the app/Http/Kernel.php and add ForceLogout middleware click for more Laravel codes read about laravel middleware

Laravel solve cors issue

Laravel solve cors issue Create Cors.php file at app/Http/Middleware/Cors.php Open app/Http/Kernel.php file and add this in $middleware array and $routeMiddleware array. Close routes in middleware in routes.php click for more Laravel codes read about laravel middlewares

Laravel export excel files

Laravel export excel files Download PhpSpreadsheet from official website(use composer method). Paste the downloaded folder at app/Http/Helpers folder. Create a Function in Controller and include and use the downloaded sdk. click for more Laravel codes

How to use MongoDB in Laravel

In MySQL Database we stores the records in the form of rows and tables. But we need to define the structure of table and columns before inserting records. MySQL is quite slow in comparison to MongoDB while dealing with large …