pixelfed/app/Http/Controllers/ProfileController.php

17 lines
403 B
PHP
Raw Normal View History

<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
2018-04-19 05:56:33 +00:00
use App\{Profile};
class ProfileController extends Controller
{
2018-04-19 05:56:33 +00:00
public function show(Request $request, $username)
{
$user = Profile::whereUsername($username)->firstOrFail();
$timeline = $user->statuses()->orderBy('id','desc')->paginate(10);
return view('profile.show', compact('user', 'timeline'));
}
}