xmrmemes/app/Http/Controllers/UserController.php
dev dbfda5cf9e Almost complete site
Add dark / light theme

Add social sharing on meme pages

Add approving / pending admin section

Improve design

Add pagination on profiles

Make front end date time user friendly

Finish rough draft of site

And Much more...

Still need to fix a few minor things before it goes live. Almost
complete.
2021-07-31 00:03:33 -07:00

21 lines
461 B
PHP

<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\User;
use App\Models\Meme;
class UserController extends Controller
{
public function show($id)
{
$user = User::where('id', $id)->firstOrFail();
$data = [
'user' => $user,
'memes' => Meme::where('user_id', $user->id)->orderByDesc('created_at')->paginate(20),
];
return view('profile', ['data' => $data]);
}
}