mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-14 02:24:31 +00:00
Update SiteController
This commit is contained in:
parent
7311e81382
commit
d2c53dc56a
1 changed files with 8 additions and 4 deletions
|
@ -10,10 +10,10 @@ use App\Util\Localization\Localization;
|
||||||
|
|
||||||
class SiteController extends Controller
|
class SiteController extends Controller
|
||||||
{
|
{
|
||||||
public function home()
|
public function home(Request $request)
|
||||||
{
|
{
|
||||||
if (Auth::check()) {
|
if (Auth::check()) {
|
||||||
return $this->homeTimeline();
|
return $this->homeTimeline($request);
|
||||||
} else {
|
} else {
|
||||||
return $this->homeGuest();
|
return $this->homeGuest();
|
||||||
}
|
}
|
||||||
|
@ -24,9 +24,13 @@ class SiteController extends Controller
|
||||||
return view('site.index');
|
return view('site.index');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function homeTimeline()
|
public function homeTimeline(Request $request)
|
||||||
{
|
{
|
||||||
return view('timeline.home');
|
$this->validate($request, [
|
||||||
|
'layout' => 'nullable|string|in:grid,feed'
|
||||||
|
]);
|
||||||
|
$layout = $request->input('layout', 'feed');
|
||||||
|
return view('timeline.home', compact('layout'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function changeLocale(Request $request, $locale)
|
public function changeLocale(Request $request, $locale)
|
||||||
|
|
Loading…
Reference in a new issue