1
0
Fork 0
forked from mirror/pixelfed
pixelfed/app/Http/Controllers/TimelineController.php

39 lines
887 B
PHP
Raw Normal View History

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