Tweaking of code, along with deleting cached view files have got tests working locally again
This commit is contained in:
parent
721cbc541b
commit
c50d8a7b51
10 changed files with 56 additions and 50 deletions
|
@ -3,7 +3,6 @@
|
|||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Article;
|
||||
use Illuminate\Http\Response;
|
||||
use Jonnybarnes\IndieWeb\Numbers;
|
||||
|
||||
class ArticlesController extends Controller
|
||||
|
@ -16,11 +15,11 @@ class ArticlesController extends Controller
|
|||
public function showAllArticles($year = null, $month = null)
|
||||
{
|
||||
$articles = Article::where('published', '1')
|
||||
->date($year, $month)
|
||||
->orderBy('updated_at', 'desc')
|
||||
->simplePaginate(5);
|
||||
->date($year, $month)
|
||||
->orderBy('updated_at', 'desc')
|
||||
->simplePaginate(5);
|
||||
|
||||
return view('multipost', ['data' => $articles]);
|
||||
return view('articles', compact('articles'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -35,7 +34,7 @@ class ArticlesController extends Controller
|
|||
throw new \Exception;
|
||||
}
|
||||
|
||||
return view('singlepost', ['article' => $article]);
|
||||
return view('article', compact('article'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -62,8 +61,9 @@ class ArticlesController extends Controller
|
|||
{
|
||||
$articles = Article::where('published', '1')->orderBy('updated_at', 'desc')->get();
|
||||
$buildDate = $articles->first()->updated_at->toRssString();
|
||||
$contents = (string) view('rss', ['articles' => $articles, 'buildDate' => $buildDate]);
|
||||
|
||||
return (new Response($contents, '200'))->header('Content-Type', 'application/rss+xml');
|
||||
return response()
|
||||
->view('rss', compact('articles', 'buildDate'), 200)
|
||||
->header('Content-Type', 'application/rss+xml');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ class ContactsController extends Controller
|
|||
'/assets/profile-images/default-image';
|
||||
}
|
||||
|
||||
return view('contacts', ['contacts' => $contacts]);
|
||||
return view('contacts', compact('contacts'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -63,7 +63,7 @@ class NotesController extends Controller
|
|||
|
||||
$homepage = ($request->path() == '/');
|
||||
|
||||
return view('allnotes', ['notes' => $notes, 'homepage' => $homepage]);
|
||||
return view('notes', compact('notes', 'homepage'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -161,12 +161,7 @@ class NotesController extends Controller
|
|||
}
|
||||
$note->photoURLs = $photoURLs;
|
||||
|
||||
return view('singlenote', [
|
||||
'note' => $note,
|
||||
'replies' => $replies,
|
||||
'reposts' => $reposts,
|
||||
'likes' => $likes,
|
||||
]);
|
||||
return view('note', compact('note', 'replies', 'reposts', 'likes'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -201,7 +196,7 @@ class NotesController extends Controller
|
|||
$note->human_time = $note->updated_at->diffForHumans();
|
||||
}
|
||||
|
||||
return view('taggednotes', ['notes' => $notes, 'tag' => $tag]);
|
||||
return view('taggednotes', compact('notes', 'tag'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue