for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace PHPHub\Providers;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Support\ServiceProvider;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
class ApiExceptionHandlerProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
*/
public function boot()
$handler = app('api.exception');
$handler->register(function (ModelNotFoundException $exception) {
$exception
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
throw new NotFoundHttpException();
});
}
* Register the application services.
public function register()
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.