💄 Ajoute le compteur d'image
This commit is contained in:
parent
7cec21bc21
commit
4bc1c97006
@ -39,7 +39,9 @@ class HomeController extends Controller
|
|||||||
$month_counts = Post::where('user_id', $user_id)
|
$month_counts = Post::where('user_id', $user_id)
|
||||||
->whereYear('date_post', $today->format('Y'))
|
->whereYear('date_post', $today->format('Y'))
|
||||||
->whereMonth('date_post', $today->format('m'))->count();
|
->whereMonth('date_post', $today->format('m'))->count();
|
||||||
$image_counts = 0; // TODO #4
|
$image_counts = Post::where('user_id', Auth::user()->getAuthIdentifier())
|
||||||
|
->where('image', '!=', 'null')
|
||||||
|
->count();
|
||||||
$posts = Post::where('user_id', $user_id)->orderBy('date_post', 'DESC')->limit(9)->get();
|
$posts = Post::where('user_id', $user_id)->orderBy('date_post', 'DESC')->limit(9)->get();
|
||||||
$today_post = Post::whereDate('date_post', '=', $today->format('Y-m-d'))
|
$today_post = Post::whereDate('date_post', '=', $today->format('Y-m-d'))
|
||||||
->where('user_id', $user_id)
|
->where('user_id', $user_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user