Files
laravel-manager-packagist/src/Modules/Posts/PostsController.php
T

15 lines
308 B
PHP

<?php
namespace IriksIT\Manager\Modules\Posts;
use IriksIT\Manager\Models\Post;
class PostsController
{
/** First opzet: lists the records as JSON. The screens come with the frontend. */
public function index()
{
return response()->json(Post::query()->latest()->paginate(25));
}
}