PHPackages                             sethsharp/blog-crud - 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. [Admin Panels](/categories/admin)
4. /
5. sethsharp/blog-crud

ActiveLibrary[Admin Panels](/categories/admin)

sethsharp/blog-crud
===================

A blog CRUD package

v2.0.1(1y ago)31.1kMITPHPPHP ^8.2

Since Apr 1Pushed 1y ago1 watchersCompare

[ Source](https://github.com/SethSharp/BlogCrud)[ Packagist](https://packagist.org/packages/sethsharp/blog-crud)[ Docs](https://github.com/SethSharp/Blog)[ RSS](/packages/sethsharp-blog-crud/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (30)Used By (0)

[![Latest Version on Packagist](https://camo.githubusercontent.com/cbe8b71158045b0ff7006458226219e4b11e98fe4da8676cd8205af1a59dc2c2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7365746873686172702f626c6f672d637275642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sethsharp/blog-crud)[![Total Downloads](https://camo.githubusercontent.com/7fcf79db77e3616cdc3d61875f1765ba1ddf1c07bfcabad3e89d1b6b3167ebc2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7365746873686172702f626c6f672d637275642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sethsharp/blog-crud)

Blog
====

[](#blog)

A fully developed Laravel Blog CRUD package that allows you to manage blogs, tags &amp; collections.

**How does this package work?**This package offers a few models and provides a great base for creating a blog page for your project. The main features are:

1. A Blog model with the ability to add Tags and make it part of a Collection
2. Inbuilt role system and policies to control what actions can be performed by users
3. Built in Factories for easy seeding, development &amp; testing
4. Files to make CRUD easy - including Actions &amp; Requests

**The main 3 models of this package are:**

1. Blog: Containing all the columns you need for a Blog + SEO columns
2. Tag: Help users understand the base topics of the blog (A Blog HasMany Tags)
3. Collection: Used for concepts like a tutorial series (A blog BelongsToOne)

**Example Use Case**

1. A personal blog page which you want an easy implementation for to manage blogs - [check out this repository](https://github.com/SethSharp/portfolio/)
2. A new blog page where you can add multiple users with restrictions through the author rule + additional roles &amp; policies

**What this package does not offer**This package is as non-subjective as possible so Controllers, FE Components + additional logic is up to your implementation.

Steps for Development
---------------------

[](#steps-for-development)

### Installation (via composer)

[](#installation-via-composer)

`composer require sethsharp/blog-crud`

### Adding Service Provider

[](#adding-service-provider)

Add to your `config/app.php`

```
'providers' => [
    \SethSharp\BlogCrud\BlogServiceProvider::class
]
```

### Publishing the Migrations

[](#publishing-the-migrations)

Then to publish the migrations: `php artisan vendor:publish --tag="blog-crud-migrations"`

### Publishing the Config File

[](#publishing-the-config-file)

Publish for when you need to edit values to suit your project:

`php artisan vendor:publish --tag="blog-crud-config"`

Things that you can override include:

1. Models: Allows you to create your own models - they are automatically injected into relationships within other package models
2. Image Driver: We use the laravel-intervention library for image resizing - this defaults to `gd()`, but `imagick()` is available
3. Bucket Paths: Allows you to specify your own paths for S3 buckets in local &amp; production environments

> WARNING: When over writing models in the config you will no longer be able to pass your model to existing actions - as it expects the package models only. This will be fixed in a future release

### Other Requirements

[](#other-requirements)

**File System**This package does rely on AWS S3 logic when it comes to file uploads, via the Blog Cover or the images you can upload within your blog. So ensure that your AWS credentials are properly configured, specifically this config file in your project `config/filesystems`:

```
's3' => [
    'driver' => 's3',
    'key' => env('AWS_ACCESS_KEY_ID'),
    'secret' => env('AWS_SECRET_ACCESS_KEY'),
    'region' => env('AWS_DEFAULT_REGION'),
    'bucket' => env('AWS_BUCKET'),
    'url' => env('AWS_URL'),
    'endpoint' => env('AWS_ENDPOINT'),
    'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
    'throw' => false,
],
```

**Additional requirements:**

1. It is encouraged that you explore this package, it is very straight forward and simple. But it is necessary you know what is contained within this package to suit your use case.
2. This package implements [Coding Labs Laravel Roles](https://github.com/codinglabsau/laravel-roles), so that configuration will need to be carried out as well (don't worry its nice &amp; easy!)

### Factory Integration

[](#factory-integration)

All models integrate a factory for ease of development so make sure to use them.

### Policies

[](#policies)

There are policies for each available model in the package to add validation/protection to your routes. They must be booted in your `AppServiceProvider` like so:

```
public function boot()
{
    Gate::policy(Blog::class, BlogPolicy::class);
    Gate::policy(Tag::class, TagPolicy::class);
    Gate::policy(Collection::class, CollectionPolicy::class);
}
```

### Update a Blog

[](#update-a-blog)

```
use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse;
use SethSharp\BlogCrud\Models\Blog\Blog;
use SethSharp\BlogCrud\Actions\Blogs\UpdateBlogAction;
use SethSharp\BlogCrud\Requests\Blogs\UpdateBlogRequest;

class UpdateBlogController extends Controller
{
    public function __invoke(Blog $blog, UpdateBlogRequest $updateBlogRequest, UpdateBlogAction $updateBlogAction): RedirectResponse
    {
        $blog = $updateBlogAction($blog, $updateBlogRequest);

        $drafted = (bool)$updateBlogRequest->input('is_draft');

        return redirect()
            ->route('dashboard.blogs.index')
            ->with('success', $blog->title . ' successfully ' . ($drafted ? 'drafted' : 'published'));
    }
}
```

This is an example `UpdateBlogController`, using all the files from the package; `Blog`, `UpdateBlogRequest` &amp; `UpdateBlogAction`. Reading each of these files will give you an understanding of what they expect - so its up to you to ensure you pass the correct information.

### How does this package rely on S3

[](#how-does-this-package-rely-on-s3)

S3 is used for any images used within your content - uploading on the fly or via the blog cover. Images within the content can be achieved using the actions `StoreFileAction` &amp; `DestoryFileAction`. For optimal S3 management you can also use the `StoreBlogFileRequest` - example [here](https://github.com/SethSharp/Portfolio/blob/main/app/Http/Controllers/Dashboard/Blogs/StoreBlogImageController.php). This example will allow you to upload files on the fly within your content, then as you save your blog using the action, it will also call `CleanBlogContentAction`which makes file management so easy by ensuring your S3 and DB level are in sync. Allowing for no unused files within your content.

If you want to incorporate images with your content or just be able to build something that can integrate an editor the [TipTap Editor](https://tiptap.dev/product/editor)is the best choice by far - it is what I use in mine!

Open Source
===========

[](#open-source)

This is an open-source project, so contributions are welcome! Whether you want to add new features, fix bugs, or improve documentation, your help is appreciated. Submit your PR for review and I will review them as soon as possible.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~3 days

Total

24

Last Release

699d ago

Major Versions

v1.1.11 → v2.02024-06-16

### Community

Maintainers

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

---

Top Contributors

[![SethSharp](https://avatars.githubusercontent.com/u/58869086?v=4)](https://github.com/SethSharp "SethSharp (94 commits)")

---

Tags

blogcrudlaravellaravel-packagelaravelblog

### Embed Badge

![Health badge](/badges/sethsharp-blog-crud/health.svg)

```
[![Health](https://phpackages.com/badges/sethsharp-blog-crud/health.svg)](https://phpackages.com/packages/sethsharp-blog-crud)
```

###  Alternatives

[sebastienheyd/boilerplate

Laravel Boilerplate based on AdminLTE 3 with blade components, user management, roles, permissions, logs viewer, ...

28618.2k3](/packages/sebastienheyd-boilerplate)[slowlyo/owl-admin

基于 laravel、amis 开发的后台框架~

61214.2k26](/packages/slowlyo-owl-admin)[serverfireteam/blog

A nice blog system with laravel and laravelpanel

523.1k](/packages/serverfireteam-blog)[takielias/tablar-kit

The Elegance of Tablar Dashboard

413.4k](/packages/takielias-tablar-kit)[a2insights/filament-saas

Filament Saas for A2Insights

161.1k](/packages/a2insights-filament-saas)

PHPackages © 2026

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