Laravel -Überprüfung, ob die Anfrage willjson

extends the Symfony\Component\HttpFoundation\Request 

Determine If The Request Is Asking For JSON
if (Request::wantsJson())
{
    //
}
Lokesh003