22 lines
424 B
PHP
22 lines
424 B
PHP
<?php
|
|
|
|
namespace App\Exceptions\Ambulatorio;
|
|
|
|
use Exception;
|
|
use Illuminate\Http\Response;
|
|
|
|
class AgendamentoConflitanteException extends Exception
|
|
{
|
|
public function __construct()
|
|
{
|
|
$this->message = 'Já existe um agendamento neste horário.';
|
|
}
|
|
|
|
public function render()
|
|
{
|
|
return response()->json([
|
|
'message' => $this->message
|
|
], Response::HTTP_BAD_REQUEST);
|
|
}
|
|
}
|