wip
This commit is contained in:
@@ -9,13 +9,14 @@ class AlertController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
|
return auth()->id();
|
||||||
$alerstQuery = auth()->user()->alerts()->whereNull('seen_at');
|
$alerstQuery = auth()->user()->alerts()->whereNull('seen_at');
|
||||||
|
|
||||||
$alerts = $alerstQuery->get();
|
$alerts = $alerstQuery->get();
|
||||||
|
|
||||||
$alerstQuery->update([
|
// $alerstQuery->update([
|
||||||
'seen_at' => now(),
|
// 'seen_at' => now(),
|
||||||
]);
|
// ]);
|
||||||
|
|
||||||
return response()->json($this->format($alerts));
|
return response()->json($this->format($alerts));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user