Ajoute la vue calendrier

Pour #3
This commit is contained in:
2020-03-18 16:57:32 +01:00
parent 2ad19f4793
commit 9a6d257de0
9 changed files with 393 additions and 1 deletions

View File

@@ -43,4 +43,13 @@ class Post extends Model
$tag_to_delete->delete();
}
}
public static function getUserPostForMonth($user_id, $year, $month)
{
return self::whereMonth('date_post', $month)
->whereYear('date_post', $year)
->where('user_id', $user_id)
->orderBy('date_post')
->get();
}
}