File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change 6
6
use Illuminate \Foundation \Bus \DispatchesJobs ;
7
7
use Phpsa \LaravelApiController \Events \Created ;
8
8
use Phpsa \LaravelApiController \Events \Updated ;
9
+ use Phpsa \LaravelApiController \Events \Deleted ;
9
10
use Illuminate \Routing \Controller as BaseController ;
10
11
use Illuminate \Foundation \Validation \ValidatesRequests ;
11
12
use Phpsa \LaravelApiController \Exceptions \ApiException ;
@@ -260,6 +261,7 @@ public function handleDestroyAction($id, $request = null)
260
261
$ item = $ this ->builder ->whereKey ($ id )->firstOrFail ();
261
262
$ this ->authoriseUserAction ('delete ' , $ item );
262
263
$ item ->delete ();
264
+ event (new Deleted ($ item , $ request ));
263
265
} catch (ModelNotFoundException $ exception ) {
264
266
return $ this ->errorNotFound ('Record not found ' );
265
267
}
You can’t perform that action at this time.
0 commit comments