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 …

Creating Own PHP Helpers in a Laravel Project

Laravel has variety of global “helper” functions. We are free to use them in our own applications like app_path, ucfirst, auth, env etc. We can also define our own set of helper functions for Laravel applications and PHP packages. And …