Fix a couple of tests

This commit is contained in:
Jonny Barnes 2018-01-06 21:14:13 +00:00
parent 53875f08eb
commit 499674599b
3 changed files with 3 additions and 3 deletions

View file

@ -31,7 +31,7 @@ class ArticlesController extends Controller
{
$article = Article::where('titleurl', $slug)->firstOrFail();
if ($article->updated_at->year != $year || $article->updated_at->month != $month) {
return redirect('/blog/' . $article->updated_at->year . '/' . $article->updated_at->month .'/' . $slug);
return redirect('/blog/' . $article->updated_at->year . '/' . $article->updated_at->format('m') .'/' . $slug);
}
return view('articles.show', compact('article'));