一定不要路径错了,这个搞了我好久,记录一波
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
if ($exception instanceof NotFoundHttpException) {
dd("wocao?");
}
拓展
dd(get_class($exception), NotFoundHttpException::class, $exception instanceof NotFoundHttp