PHPackages                             kinjari/laravel-zenblog - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. kinjari/laravel-zenblog

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

kinjari/laravel-zenblog
=======================

A Laravel package for using Zenblog in your projects.

v0.2(11mo ago)09[3 PRs](https://github.com/kinjari/laravel-zenblog/pulls)MITPHPPHP ^8.4CI passing

Since Jun 13Pushed 1mo agoCompare

[ Source](https://github.com/kinjari/laravel-zenblog)[ Packagist](https://packagist.org/packages/kinjari/laravel-zenblog)[ Docs](https://github.com/kinjari/laravel-zenblog)[ GitHub Sponsors](https://github.com/kinjari)[ RSS](/packages/kinjari-laravel-zenblog/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (13)Versions (7)Used By (0)

A Laravel package for using Zenblog in your projects.
=====================================================

[](#a-laravel-package-for-using-zenblog-in-your-projects)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f3d80108f7cc54da17eef14a10d241a440e3f02b17f0edbd1251ebc5856bafd2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b696e6a6172692f6c61726176656c2d7a656e626c6f672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kinjari/laravel-zenblog)[![GitHub Tests Action Status](https://camo.githubusercontent.com/4dd757481b08eade6e7db51250ebe27c2a5f024343b576d88d37c0e676678393/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6b696e6a6172692f6c61726176656c2d7a656e626c6f672f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/kinjari/laravel-zenblog/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/2df157aa054caebd2a532075bdc0a3abde105450c7bcc8b08b28863c4a3e3692/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6b696e6a6172692f6c61726176656c2d7a656e626c6f672f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/kinjari/laravel-zenblog/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/2e90254e05ffac9aec54d2a18d9dc0a8c9d5beaa7e02e3dfa990b0ed2859e21b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b696e6a6172692f6c61726176656c2d7a656e626c6f672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kinjari/laravel-zenblog)

A Laravel package that provides a simple and elegant interface to interact with the Zenblog API. Fetch posts, categories, tags, and authors with ease using Laravel's familiar syntax.

Support us
----------

[](#support-us)

[![](https://camo.githubusercontent.com/b7bba3602d8404de9be3f1546ad5520b9003f6165918ea1295c5af61751a082a/68747470733a2f2f6769746875622d6164732e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f6c61726176656c2d7a656e626c6f672e6a70673f743d31)](https://spatie.be/github-ad-click/laravel-zenblog)

We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require kinjari/laravel-zenblog
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="laravel-zenblog-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --tag="laravel-zenblog-config"
```

This is the contents of the published config file:

```
return [
    'api_url' => env('ZENBLOG_API_URL', 'https://demo.zenblog.org/api'),
    'blog_id' => env('ZENBLOG_BLOG_ID', null),
];
```

Configuration
-------------

[](#configuration)

Add these environment variables to your `.env` file:

```
# Required: Your Zenblog API URL
ZENBLOG_API_URL=https://your-blog.zenblog.com/api

# Optional: Your Blog ID for authentication (if required by your Zenblog instance)
ZENBLOG_BLOG_ID=your-blog-id-from-dashboard
```

The `blog_id` is required for most Zenblog installations and will be included in the API URL path as `/blogs/{blog_id}/...`. You can find your blog ID in the Zenblog dashboard.

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="laravel-zenblog-views"
```

Usage
-----

[](#usage)

The package provides four models to interact with the Zenblog API: `Post`, `Category`, `Tag`, and `Author`. Each model supports the same methods for fetching data.

### Posts

[](#posts)

```
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
```

### Categories

[](#categories)

```
use Kinjari\LaravelZenblog\Models\Category;

// Get all categories
$categories = Category::all();

// Get paginated categories
$paginatedCategories = Category::paginate(10, 1);
```

### Tags

[](#tags)

```
use Kinjari\LaravelZenblog\Models\Tag;

// Get all tags
$tags = Tag::all();

// Get paginated tags
$paginatedTags = Tag::paginate(10, 1);
```

### Authors

[](#authors)

```
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);
```

### Working with Results

[](#working-with-results)

All models return collections or individual model instances with accessible attributes:

```
$post = Post::find('my-blog-post');
echo $post->title;
echo $post->content;
echo $post->slug;

$posts = Post::all();
foreach ($posts as $post) {
    echo $post->title;
}
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [kinjari](https://github.com/kinjari)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance74

Regular maintenance activity

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 76% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

332d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f6a58d95e2d77975f0b1ef1a94ae21bc1f4e292fb55e2b68b141328ecdbbe386?d=identicon)[lukehebb](/maintainers/lukehebb)

---

Top Contributors

[![lukehebb](https://avatars.githubusercontent.com/u/3617309?v=4)](https://github.com/lukehebb "lukehebb (19 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

---

Tags

laravelkinjarilaravel-zenblog

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/kinjari-laravel-zenblog/health.svg)

```
[![Health](https://phpackages.com/badges/kinjari-laravel-zenblog/health.svg)](https://phpackages.com/packages/kinjari-laravel-zenblog)
```

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.7k28.9M627](/packages/spatie-laravel-data)[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
