Skip to content

Instantly share code, notes, and snippets.

View noxidsoft's full-sized avatar
🚀
Working on new projects

Noel Dixon (Business) noxidsoft

🚀
Working on new projects
View GitHub Profile
@noxidsoft
noxidsoft / WSL2-Docker-Laravel.md
Created December 16, 2022 05:53
WSL2-Docker-Laravel
@meSingh
meSingh / JsonMiddleware.php
Last active July 11, 2022 09:19
If you are using laravel as api only, you might want to return JSON on every request, even on errors/exceptions. The easiest way to do so is using this middleware globally.
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
class JsonMiddleware
{
public function handle(Request $request, Closure $next)