We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f4cc11d commit f479ddcCopy full SHA for f479ddc
src/Http/Api/Controller.php
@@ -6,6 +6,7 @@
6
use Illuminate\Foundation\Bus\DispatchesJobs;
7
use Phpsa\LaravelApiController\Events\Created;
8
use Phpsa\LaravelApiController\Events\Updated;
9
+use Phpsa\LaravelApiController\Events\Deleted;
10
use Illuminate\Routing\Controller as BaseController;
11
use Illuminate\Foundation\Validation\ValidatesRequests;
12
use Phpsa\LaravelApiController\Exceptions\ApiException;
@@ -260,6 +261,7 @@ public function handleDestroyAction($id, $request = null)
260
261
$item = $this->builder->whereKey($id)->firstOrFail();
262
$this->authoriseUserAction('delete', $item);
263
$item->delete();
264
+ event(new Deleted($item, $request));
265
} catch (ModelNotFoundException $exception) {
266
return $this->errorNotFound('Record not found');
267
}
0 commit comments