We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can you show a pagination example usage please ?
The text was updated successfully, but these errors were encountered:
okey i found a way to do it, i am using laravel for my projects
this code is just a sample and not a good one but it works
if anyone knows a better code please share
<?php namespace App\Http\Controllers; use App\Http\Controllers\Controller; use Illuminate\Http\Request; use Illuminate\Pagination\LengthAwarePaginator; use Tumblr; class HomeController extends Controller { public function index($blogName, Request $request) { $page = $request->input('page'); $consumerKey = 'ps3J8J'; $consumerSecret = 'dqcrP3'; $client = new Tumblr($consumerKey, $consumerSecret); $post = $client->getBlogPosts($blogName, [ 'limit' => 20, 'offset' => $page * 20, ]); $blog = (new LengthAwarePaginator($post->posts, 20000, 20, $page, ['path' => $request->url()])); return view('home', compact('blog', 'post')); }
Sorry, something went wrong.
Your code looks good.
No branches or pull requests
can you show a pagination example usage please ?
The text was updated successfully, but these errors were encountered: