2018-04-16 01:56:17 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
|
2018-11-09 01:27:38 +00:00
|
|
|
use Illuminate\Http\Request;
|
2018-04-16 01:56:17 +00:00
|
|
|
|
|
|
|
class TimelineController extends Controller
|
|
|
|
{
|
2021-04-07 03:17:42 +00:00
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
$this->middleware('auth');
|
|
|
|
$this->middleware('twofactor');
|
|
|
|
}
|
2018-04-16 01:56:17 +00:00
|
|
|
|
2021-04-07 03:17:42 +00:00
|
|
|
public function local(Request $request)
|
|
|
|
{
|
|
|
|
$this->validate($request, [
|
|
|
|
'layout' => 'nullable|string|in:grid,feed'
|
|
|
|
]);
|
|
|
|
$layout = $request->input('layout', 'feed');
|
|
|
|
return view('timeline.local', compact('layout'));
|
|
|
|
}
|
2019-03-20 19:59:43 +00:00
|
|
|
|
2021-04-07 03:17:42 +00:00
|
|
|
public function network(Request $request)
|
|
|
|
{
|
|
|
|
abort_if(config('federation.network_timeline') == false, 404);
|
|
|
|
$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
|
|
|
}
|