1. Go to this page and download the library: Download kinjari/laravel-zenblog library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use Kinjari\LaravelZenblog\Models\Post;
// Get all posts
$posts = Post::all();
// Find a specific post by slug
$post = Post::find('my-blog-post');
// Get paginated posts
$paginatedPosts = Post::paginate(10, 1); // 10 per page, page 1
use Kinjari\LaravelZenblog\Models\Category;
// Get all categories
$categories = Category::all();
// Get paginated categories
$paginatedCategories = Category::paginate(10, 1);
use Kinjari\LaravelZenblog\Models\Tag;
// Get all tags
$tags = Tag::all();
// Get paginated tags
$paginatedTags = Tag::paginate(10, 1);
use Kinjari\LaravelZenblog\Models\Author;
// Get all authors
$authors = Author::all();
// Find a specific author by slug
$author = Author::find('john-doe');
// Get paginated authors
$paginatedAuthors = Author::paginate(10, 1);