Add API back and pagination

This commit is contained in:
dev 2022-04-24 19:25:31 -05:00
parent a7943e53ea
commit 60e29588ea
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ class ApiController extends Controller
public function memes()
{
$memes = Meme::get();
$memes = Meme::paginate(100);
return $memes;
}

View File

@ -18,4 +18,4 @@ Route::middleware('auth:api')->get('/user', function (Request $request) {
return $request->user();
});
// Route::middleware('api')->get('memes', [App\Http\Controllers\ApiController::class, 'memes']);
Route::middleware('api')->get('memes', [App\Http\Controllers\ApiController::class, 'memes']);