Level 88
Mmh this should work just fine. What kind of response do you get now?
1 like
hi . how i can make custom exception ? i use this but not work
<?php
namespace App\Exceptions;
use Exception;
class RobotException extends Exception
{
public function render()
{
return response(['error' => 'my error msg'], 422);
}
}
$router->get('/', function () use ($router) {
throw new \App\Exceptions\RobotException();
});
Please or to participate in this conversation.