Skip to content

Instantly share code, notes, and snippets.

@uno-de-piera uno-de-piera/PostController.php Secret
Created Jun 12, 2019

What would you like to do?
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
You can’t perform that action at this time.