Download the PHP package vitebox/laravel-blog without Composer

On this page you can find all versions of the php package vitebox/laravel-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-blog

Laravel Blog (vitebox/laravel-blog)

A drop-in blog management backend for any Laravel 12 or 13 application (PHP 8.2+). You get:

It has no front-end build step and no extra Composer dependencies. It never modifies your users table.


1. Installation

blog:install does the following:

Then open /blog-admin.

The package is auto-discovered, so you don't need to register a provider or alias. The admin panel uses your app's web + auth middleware, so users log in through your normal login page.

Using the package from a local folder or a private Git repo

Before migrating: UUID / ULID user keys

If your users table uses UUID or ULID keys, set this before you run the migrations:

Scheduled publishing

The package adds blog:publish-scheduled to Laravel's scheduler. It runs every minute. For it to work, the standard scheduler cron must be running on your server:


2. Roles and permissions

Permission Admin Publisher Reviewer Writer
posts.create (write, edit own drafts, submit) ✔ ✔ ✔ ✔
posts.view_any ✔ ✔ ✔ –
posts.update_any ✔ ✔ – –
posts.delete_any ✔ – – –
posts.review (approve / request changes) ✔ – ✔ –
posts.publish (publish, schedule, unpublish, archive, feature, pin) ✔ ✔ – –
categories.manage ✔ ✔ – –
tags.create (new tags while writing) ✔ ✔ ✔ ✔
tags.manage ✔ ✔ – –
team.manage ✔ – – –

The matrix lives in config/blog.php under roles, so you can change it without touching code. * and posts.* wildcards are supported.

Other rules:

Assigning roles. Use the admin panel (Team & roles), the CLI, or code:

Emergency access. Add BLOG_SUPER_ADMINS="[email protected]" to .env. Anyone listed there always has Admin access.

Optional trait for your User model:

Gates. The package registers a gate for every permission (blog.posts.publish, blog.categories.manage, …) and a PostPolicy. You can use them in your own code:


3. Editorial workflow

Events. Listen to these to send notifications (mail, Slack, …):

PostStatusChanged (fired on every transition), PostSubmittedForReview, PostApproved, PostChangesRequested, PostScheduled, PostPublished, PostUnpublished, PostArchived.

Each event carries $post, $from, $to, $user and $comment.


4. Post types

Key Cover Video Extra fields
standard required – –
video required required (YouTube / Vimeo / .mp4 URL, or upload) duration, transcript
event optional – starts_at*, ends_at, venue, address, is_online, online_url, registration_url, organizer, price, capacity
article optional – subtitle, byline, show_toc, references
news optional – is_breaking, source_name, source_url, location
announcement optional – priority* (low / normal / high / critical), audience, expires_at, show_banner, cta_label, cta_url

Fields that need to be queried are stored in real, indexed columns: starts_at, ends_at and expires_at. All other fields are stored in the type_data JSON column. Everything is validated according to the type.

Adding your own type

The form, validation, storage and API output are generated from these definitions.


5. Slugs

In your own front-end routes:


6. Using posts on your website

Eloquent

JSON API (prefix api/blog; only published content is exposed)

Endpoint Notes
GET /posts ?type=event,news&category=slug&tag=slug&q=term&featured=1&sort=latest\|popular\|oldest&per_page=12
GET /posts/{slug} Full content plus related posts. Counts a view. Old slugs return a 301.
GET /events/upcoming
GET /announcements/active
GET /categories Nested tree with post counts
GET /categories/{slug}
GET /tags
GET /tags/{slug}
GET /types Post type definitions

7. Configuration highlights (config/blog.php)

Key Default Purpose
user_model App\Models\User Your user model
table_prefix blog_ Prefix for all package tables
admin.prefix / admin.middleware / admin.domain blog-admin / ['web','auth'] / null Where the admin panel lives and who can reach it
api.enabled / api.prefix / api.middleware true / api/blog / ['api'] Public API
media.disk public Any filesystem disk, e.g. s3
content.sanitizer BasicHtmlSanitizer Allow-list HTML cleaning. Strips scripts, event handlers and javascript: URLs, and only allows YouTube/Vimeo iframes. Bind your own Contracts\HtmlSanitizer (e.g. HTMLPurifier) if you prefer.
content.editor textarea trix loads the Trix WYSIWYG editor

Customising the UI. Run php artisan vendor:publish --tag=blog-views and edit the files in resources/views/vendor/blog.


8. Database tables

All tables use the configured prefix:


9. Testing

The suite contains 42 tests covering roles, the workflow, slugs, post types, the API, the sanitizer and a render check of every admin page.

License

MIT

Screenshots


All versions of laravel-blog with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-dom Version *
laravel/framework Version ^12.0|^13.0
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 vitebox/laravel-blog contains the following files

Loading the files please wait ...