PHPackages                             stephenjude/filament-blog - 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. stephenjude/filament-blog

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

stephenjude/filament-blog
=========================

Filament Blog Builder

4.2.2(7mo ago)20317.8k↓10.3%45[2 issues](https://github.com/stephenjude/filament-blog/issues)MITPHPPHP ^8.3CI passing

Since Feb 19Pushed 4mo ago6 watchersCompare

[ Source](https://github.com/stephenjude/filament-blog)[ Packagist](https://packagist.org/packages/stephenjude/filament-blog)[ Docs](https://github.com/stephenjude/filament-blog)[ GitHub Sponsors](https://github.com/stephenjude)[ RSS](/packages/stephenjude-filament-blog/feed)WikiDiscussions 4.x Synced 1mo ago

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

[![](https://raw.githubusercontent.com/stephenjude/filament-blog/main/art/banner.jpg)](https://raw.githubusercontent.com/stephenjude/filament-blog/main/art/banner.jpg)

Filament Blog Builder
=====================

[](#filament-blog-builder)

[![Latest Version on Packagist](https://camo.githubusercontent.com/7eb3f8f301e2243f65f96e1e4d9abf5190f84d9d221d245e09b89a3dcabc0869/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7374657068656e6a7564652f66696c616d656e742d626c6f672e737667)](https://packagist.org/packages/stephenjude/filament-blog)[![GitHub Tests Action Status](https://camo.githubusercontent.com/d8ebdf3305742e913823de58f28911f4bc0d435eaa5780fc53ef3057fa0cfece/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7374657068656e6a7564652f66696c616d656e742d626c6f672f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473)](https://github.com/stephenjude/filament-blog/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/a419fe1b74faf2b3facb0bce34fc78ea3bd6d00a1932a92e4ed69c8691a26d86/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7374657068656e6a7564652f66696c616d656e742d626c6f672f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63682d6d61696e266c6162656c3d636f64652532307374796c65)](https://github.com/stephenjude/filament-blog/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/249ead87e9cfc96f7c38abe103eaaf8a63c141924d88564acf9ba15e7e33d0f5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7374657068656e6a7564652f66696c616d656e742d626c6f672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/stephenjude/filament-blog)

A faceless blog content manager with configurable richtext and markdown support for a filament admin panel.

[![](https://raw.githubusercontent.com/stephenjude/filament-blog/main/art/screen1.png)](https://raw.githubusercontent.com/stephenjude/filament-blog/main/art/screen1.png)

Filament Admin Panel
--------------------

[](#filament-admin-panel)

This package is tailored for [Filament Admin Panel](https://filamentphp.com/).

Make sure you have installed the admin panel before you continue with the installation. You can check the [documentation here](https://filamentphp.com/docs/admin)

Supported Versions
------------------

[](#supported-versions)

PHP: `8.1` &amp; `8.2`

Laravel: `10`

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

[](#installation)

You can install the package via composer:

```
composer require stephenjude/filament-blog

php artisan filament-blog:install

php artisan storage:link

php artisan migrate
```

You'll have to register the plugin in your panel provider.

```
use Stephenjude\FilamentBlog\BlogPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ...
        ->plugin(
            BlogPlugin::make()
        );
}
```

### Authorization/Access Control

[](#authorizationaccess-control)

You can authorize the plugin for users with a specific role/permission:

```
\Stephenjude\FilamentBlog\BlogPlugin::make()
    ->authorizePost(fn() => auth()->user()->can('edit.posts'));
    ->authorizeAuthor(fn() => auth()->user()->can('edit.authors'));
    ->authorizeCategory(fn() => auth()->user()->can('edit.category'));
```

Displaying your content
-----------------------

[](#displaying-your-content)

Filament blog builder is faceless, it doesn't have any opinions on how you display your content in your frontend. You can use the blog models in your controllers to display the different resources:

- `Stephenjude\FilamentBlog\Models\Post`
- `Stephenjude\FilamentBlog\Models\Author`
- `Stephenjude\FilamentBlog\Models\Category`

### Posts &amp; Drafts

[](#posts--drafts)

```
$posts = Post::published()->get();

$drafts = Post::draft()->get();
```

### Post Content

[](#post-content)

```
$post = Post::find($id);

$post->id;
$post->title;
$post->slug;
$post->excerpt;
$post->banner_url;
$post->content;
$post->published_at;
```

### Post Category &amp; Author

[](#post-category--author)

```
$post = Post::with(['author', 'category'])->find($id);

$author = $post->author;

$author->id;
$author->name;
$author->email;
$author->photo;
$author->bio;
$author->github_handle;
$author->twitter_handle;

$category = $post->category;

$category->id;
$category->name;
$category->slug;
$category->description;
$category->is_visible;
$category->seo_title;
$category->seo_description;
```

### Configurations

[](#configurations)

This is the contents of the published config file:

```
