-
-
Save uno-de-piera/51d2855281f69c34649097b001a1d7ce to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use App\Models\Post; | |
class PostController extends Controller | |
{ | |
public function index () { | |
$posts = Post::with('user')->paginate(config('constants.pagination.per_page'); | |
return view('posts', compact('posts')); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment