create notification controller

This commit is contained in:
2025-03-05 16:11:04 +03:30
parent 96edaaddb4
commit fa108b23d5
3 changed files with 239 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
<?php
namespace App\Exceptions;
use App\Http\Traits\ApiResponse;
use Exception;
use Illuminate\Http\JsonResponse;
use Throwable;
class ProhibitedAction extends Exception
{
use ApiResponse;
public function __construct(public $message = "", int $code = 422, ?Throwable $previous = null)
{
parent::__construct($message, $code, $previous);
}
/**
* Render the exception into an HTTP response.
*/
public function render(): JsonResponse
{
return $this->errorResponse($this->message);
}
}