Laravel Verifique se a solicitação da API

if (Request::wantsJson()) {
    // return JSON-formatted response
} else {
    // return HTML response
}
Cybernated Dev