22 lines
408 B
PHP
22 lines
408 B
PHP
<?php
|
|
|
|
namespace App\Exceptions;
|
|
|
|
use Exception;
|
|
|
|
class InvalidUuidException extends Exception {
|
|
|
|
protected $uuid;
|
|
|
|
public function __construct($uuid) {
|
|
$this->uuid = $uuid;
|
|
}
|
|
|
|
public function render($request) {
|
|
return response()->json([
|
|
'error' => 'invalid_uuid',
|
|
'message' => 'El id ' . $this->uuid . ' no es un UUID valido'
|
|
], 400);
|
|
}
|
|
}
|