Skip to content

Commit 7233598

Browse files
committed
wip
1 parent 746f5cc commit 7233598

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

src/Controllers/AuthenticationMonitoringController.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,22 @@
22

33
namespace Binafy\LaravelUserMonitoring\Controllers;
44

5-
class AuthenticationMonitoringController
5+
use Binafy\LaravelUserMonitoring\Models\AuthenticationMonitoring;
6+
7+
class AuthenticationMonitoringController extends BaseController
68
{
9+
public function index()
10+
{
11+
$authentications = AuthenticationMonitoring::query()->latest()->get();
12+
13+
return view('LaravelUserMonitoring::authenitcations-monitoring.index', compact('authentications'));
14+
}
15+
16+
public function destroy(AuthenticationMonitoring $authenticationMonitoring)
17+
{
18+
$authenticationMonitoring->delete();
719

20+
// TODO: Add alert
21+
return to_route('user-monitoring.authentications-monitoring');
22+
}
823
}

src/Controllers/VisitMonitoringController.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ public function index()
1010
{
1111
$visits = VisitMonitoring::query()->latest()->get();
1212

13-
return view('LaravelUserMonitoring::visit-monitoring.index', compact('visits'));
13+
return view('LaravelUserMonitoring::visits-monitoring.index', compact('visits'));
1414
}
1515

16-
public function destroy(int $id)
16+
public function destroy(VisitMonitoring $visitMonitoring)
1717
{
18-
VisitMonitoring::query()->where('id', $id)->delete();
18+
$visitMonitoring->delete();
1919

2020
// TODO: Add alert
2121
return to_route('user-monitoring.visits-monitoring');
2222
}
23-
}
23+
}

0 commit comments

Comments
 (0)