🐛 Corrige un bug en cas de deconnexion et un compteur
This commit is contained in:
parent
c23baa8684
commit
6ef79c10dd
@ -33,7 +33,7 @@ class HomeController extends Controller
|
||||
$today = new DateTime();
|
||||
$user_id = Auth::user()->getAuthIdentifier();
|
||||
$all_counts = Post::where('user_id', $user_id)->count();
|
||||
$year_counts = Post::where('user_id', $user_id)->count();
|
||||
$year_counts = Post::where('user_id', $user_id)->whereYear('date_post', $today->format('Y'))->count();
|
||||
$month_counts = Post::where('user_id', $user_id)
|
||||
->whereYear('date_post', $today->format('Y'))
|
||||
->whereMonth('date_post', $today->format('m'))->count();
|
||||
|
@ -20,7 +20,7 @@
|
||||
<link href="{{ asset('css/app.css') }}" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<div>
|
||||
<nav class="navbar navbar-expand-md navbar-light bg-white shadow-sm">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="{{ url('/') }}">
|
||||
|
Loading…
Reference in New Issue
Block a user