Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀
Working on new projects

RustyNox noxidsoft

🚀
Working on new projects
View GitHub Profile
@noxidsoft
noxidsoft / WSL2-Docker-Laravel.md
Created December 16, 2022 05:53
WSL2-Docker-Laravel
View WSL2-Docker-Laravel.md
@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.
View JsonMiddleware.php
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
class JsonMiddleware
{
public function handle(Request $request, Closure $next)