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

Create Custom Logs in Laravel

Log is a way which we can use to keep track of input data, output data, requests made through our applications, log system error messages, notify about informations to teams. In our laravel applications we can use logging services to …

How to Optimize Database Queries in Laravel?

Some times to run larger laravel applications smoothly we needs to optimize our laravel application. One of these tasks here is how to optimize database queries in laravel. Methods to Optimize Database Queries in Laravel Retrieving Large Data Records Option …