This commit is contained in:
15
api/app/Exceptions/Model/DeletingModelException.php
Normal file
15
api/app/Exceptions/Model/DeletingModelException.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions\Model;
|
||||
|
||||
use Exception;
|
||||
|
||||
class DeletingModelException extends Exception
|
||||
{
|
||||
public function render()
|
||||
{
|
||||
return response()->json([
|
||||
'message' => 'O registro possui vínculos e não pode ser excluído.'
|
||||
], 400);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user