“Laravel Throw Exception com código de status” Respostas de código

throwException Laravel

throw new \ErrorException('Error found');
prem@web_dev

Laravel Throw Exception com código de status

try {
    throw new Exception("Some error message", 30);
  //here 30 is the custom code
} catch(Exception $e) {
    echo "The exception code is: " . $e->getCode();
}
Indian Gooner

Faça a exceção Laravel

php artisan make:exception UserNotFoundException
kinjal suryavanshi

Respostas semelhantes a “Laravel Throw Exception com código de status”

Perguntas semelhantes a “Laravel Throw Exception com código de status”

Mais respostas relacionadas para “Laravel Throw Exception com código de status” em PHP

Procure respostas de código populares por idioma

Procurar outros idiomas de código