laravel wantsJson code example
Example: laravel check if request wantsjson
extends the Symfony\Component\HttpFoundation\Request
Determine If The Request Is Asking For JSON
if (Request::wantsJson())
{
//
}
extends the Symfony\Component\HttpFoundation\Request
Determine If The Request Is Asking For JSON
if (Request::wantsJson())
{
//
}