1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2025-03-04 18:48:21 +00:00
pixelfed/app/Http/Controllers/TimelineController.php

39 lines
887 B
PHP
Raw Normal View History

2018-04-15 19:56:17 -06:00
<?php
namespace App\Http\Controllers;
2018-11-15 20:26:10 -07:00
use Auth, Cache;
2018-08-28 03:07:36 +00:00
use App\Follower;
use App\Profile;
use App\Status;
use App\User;
use App\UserFilter;
2018-11-08 18:27:38 -07:00
use Illuminate\Http\Request;
2018-04-15 19:56:17 -06:00
class TimelineController extends Controller
{
public function __construct()
{
2018-08-28 03:07:36 +00:00
$this->middleware('auth');
2018-09-15 23:15:45 -06:00
$this->middleware('twofactor');
2018-04-15 19:56:17 -06:00
}
2018-11-08 18:27:38 -07:00
public function local(Request $request)
{
2020-02-18 00:38:25 -07:00
$this->validate($request, [
'layout' => 'nullable|string|in:grid,feed'
]);
$layout = $request->input('layout', 'feed');
return view('timeline.local', compact('layout'));
2018-08-28 03:07:36 +00:00
}
public function network(Request $request)
{
2020-02-18 00:38:25 -07:00
$this->validate($request, [
'layout' => 'nullable|string|in:grid,feed'
]);
$layout = $request->input('layout', 'feed');
return view('timeline.network', compact('layout'));
}
2018-04-15 19:56:17 -06:00
}