File tree Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 33namespace Binafy \LaravelUserMonitoring \Controllers ;
44
55use Binafy \LaravelUserMonitoring \Models \ActionMonitoring ;
6+ use Illuminate \Support \Facades \DB ;
67
78class ActionMonitoringController extends BaseController
89{
@@ -13,9 +14,11 @@ public function index()
1314 return view ('LaravelUserMonitoring::actions-monitoring.index ' , compact ('actions ' ));
1415 }
1516
16- public function destroy (ActionMonitoring $ actionMonitoring )
17+ public function destroy (int $ id )
1718 {
18- $ actionMonitoring ->delete ();
19+ DB ::table (config ('user-monitoring.action_monitoring.table ' ))
20+ ->where ('id ' , $ id )
21+ ->delete ();
1922
2023 // TODO: Add alert
2124 return to_route ('user-monitoring.actions-monitoring ' );
Original file line number Diff line number Diff line change 33namespace Binafy \LaravelUserMonitoring \Controllers ;
44
55use Binafy \LaravelUserMonitoring \Models \AuthenticationMonitoring ;
6+ use Illuminate \Support \Facades \DB ;
67
78class AuthenticationMonitoringController extends BaseController
89{
@@ -13,9 +14,11 @@ public function index()
1314 return view ('LaravelUserMonitoring::authentications-monitoring.index ' , compact ('authentications ' ));
1415 }
1516
16- public function destroy (AuthenticationMonitoring $ authenticationMonitoring )
17+ public function destroy (int $ id )
1718 {
18- $ authenticationMonitoring ->delete ();
19+ DB ::table (config ('user-monitoring.authentication_monitoring.table ' ))
20+ ->where ('id ' , $ id )
21+ ->delete ();
1922
2023 // TODO: Add alert
2124 return to_route ('user-monitoring.authentications-monitoring ' );
Original file line number Diff line number Diff line change 33namespace Binafy \LaravelUserMonitoring \Controllers ;
44
55use Binafy \LaravelUserMonitoring \Models \VisitMonitoring ;
6+ use Illuminate \Support \Facades \DB ;
67
78class VisitMonitoringController extends BaseController
89{
@@ -15,7 +16,9 @@ public function index()
1516
1617 public function destroy (int $ id )
1718 {
18- VisitMonitoring::query ()->findOrFail ($ id )->delete ();
19+ DB ::table (config ('user-monitoring.visit_monitoring.table ' ))
20+ ->where ('id ' , $ id )
21+ ->delete ();
1922
2023 // TODO: Add alert
2124 return to_route ('user-monitoring.visits-monitoring ' );
You can’t perform that action at this time.
0 commit comments