Download the PHP package ozankurt/laravel-modules-blog without Composer

On this page you can find all versions of the php package ozankurt/laravel-modules-blog. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-modules-blog

laravel-modules-blog

tests

Headless blog module for Laravel: posts, categories, tags, comments, scheduled publishing, SEO meta, translatable content, Spatie medialibrary.

Requirements

Installation

Publish config and migrations:

What it provides

Related posts

$post->related(int $limit = 5) returns published, non-self posts ranked by relatedness: those sharing the most tags come first, then a shared category acts as a fallback so lightly-tagged posts still surface neighbours. It runs as a single query (no N+1) — only the current post's tag ids are loaded up front, and the overlap count is a correlated subquery over the pivot.

A post with neither tags nor a category has no neighbours and yields an empty collection.

Headless helpers

The module ships no routes or views. Feed and sitemap generation are provided as support classes that return a string or a data structure; your app decides where to expose them.

RSS / feed — FeedBuilder

Kurt\Modules\Blog\Support\FeedBuilder builds the latest published posts into an RSS 2.0 XML string (toRss()) or a plain data structure (toArray(), for JSON Feed / Atom / a Blade view). Count is configurable, and the feed can be scoped to a category. All dynamic text is XML-escaped, so toRss() is always well-formed.

Defaults (feed title/description/limit) live under the feed key in config/blog.php.

Sitemap — SitemapBuilder

Kurt\Modules\Blog\Support\SitemapBuilder returns SitemapEntry objects (loc / lastmod / changefreq / priority) for public content: every published post, every category holding at least one published post, and (opt-in) every tag that does. Draft, scheduled and future-dated posts — and categories/tags whose only posts are non-public — are excluded.

Feed the entries into whichever sitemap package or response your app already uses. Per-type change frequencies live under the sitemap key in config/blog.php.

API

The module ships an out-of-the-box JSON REST API built on the Core API kit (ozankurt/laravel-modules-core v2.x). It is safe by default: nothing is registered until you opt in.

Enabling

Set the mode to api (or ui) — headless registers no routes:

Everything is driven by the http block published to config/blog.php:

Every route is throttled by the named blog-api limiter (keyed by user id, or client IP for guests).

Endpoints

All paths are relative to the configured prefix (default /api/blog). Responses use the Core { "data": ..., "meta": ... } envelope; index endpoints add meta.pagination.

Method Path Auth Description
GET /posts public List posts. ?sort=created_at,-published_at,title, ?filter[category]=, ?filter[status]=, ?filter[author]=, ?per_page=.
GET /posts/{id\|slug} public Show a post by id or slug.
POST /posts auth Create a post (authored by the current user).
PATCH/PUT /posts/{id\|slug} auth Update a post.
DELETE /posts/{id\|slug} auth Soft-delete a post (204).
POST /posts/{id\|slug}/publish auth Publish now (backfills published_at).
POST /posts/{id\|slug}/unpublish auth Revert to draft.
GET /posts/{id\|slug}/related public Related posts (shared tags, then category). ?limit=.
GET /posts/{id\|slug}/comments public Approved comments for a post (staff see all).
POST /posts/{id\|slug}/comments auth Add a comment to a post (201).
PATCH/PUT /comments/{id} auth Edit a comment.
DELETE /comments/{id} auth Soft-delete a comment (204).
GET /categories public List categories.
GET /categories/{id} public Show a category.
POST /categories auth Create a category.
PATCH/PUT /categories/{id} auth Update a category.
DELETE /categories/{id} auth Soft-delete a category (204).
GET /tags public List tags.
GET /tags/{id} public Show a tag.
POST /tags auth Create a tag.
DELETE /tags/{id} auth Soft-delete a tag (204).

Auth & policies

Requests are validated with FormRequests, so invalid payloads return the standard 422 { "message": ..., "errors": ... } envelope.

Filament admin

The package ships parallel admin resource sets for Filament v3, v4, and v5 — PostResource, CategoryResource, TagResource, and CommentResource. The correct set is chosen at runtime from the installed Filament major, so you register a single version-dispatching plugin on your panel:

BlogPlugin::make() resolves to the matching V3/V4/V5 plugin via Kurt\Modules\Core\Support\FilamentVersion. Install whichever Filament major your app uses — the resources require nothing beyond what the module already depends on:

What the resources give you:

Testing

CI runs the same checks on every push and pull request (.github/workflows/tests.yml), against PHP 8.4 / Laravel 13. Static analysis is held at PHPStan level 8; the suite runs on Pest 5.

License

MIT (c) Ozan Kurt


All versions of laravel-modules-blog with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
cviebrock/eloquent-sluggable Version ^12.0 || ^13.0
illuminate/contracts Version ^13.0
illuminate/database Version ^13.0
illuminate/support Version ^13.0
ozankurt/laravel-modules-core Version ^2.0
ozankurt/laravel-modules-interactions Version ^2.0
spatie/laravel-medialibrary Version ^11.0
spatie/laravel-package-tools Version ^1.93
spatie/laravel-translatable Version ^6.11
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ozankurt/laravel-modules-blog contains the following files

Loading the files please wait ...