PHPackages                             gorankrgovic/larablog - 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. [Framework](/categories/framework)
4. /
5. gorankrgovic/larablog

ActiveLibrary[Framework](/categories/framework)

gorankrgovic/larablog
=====================

Larablog is simple but yet powerful Blog package for the Laravel 5.6 and up.

v1.0.1(7y ago)15MITPHPPHP ^7.1.3

Since Jun 26Pushed 7y ago1 watchersCompare

[ Source](https://github.com/gorankrgovic/larablog)[ Packagist](https://packagist.org/packages/gorankrgovic/larablog)[ Docs](https://github.com/gorankrgovic/larablog)[ RSS](/packages/gorankrgovic-larablog/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (2)Used By (0)

Larablog
========

[](#larablog)

A package for easier maintenance of the blog (or news) articles.

Installation, Configuration and Usage
-------------------------------------

[](#installation-configuration-and-usage)

Via Composer:

```
$ composer require gorankrgovic/larablog
```

### Configuration

[](#configuration)

Once you install the package, it should be automatically discovered by the Laravel. To check this, in your terminal simply run the:

```
$ php artisan
```

Once you run the command, you shoul dbe able to find all `larablog` commands available.

First step is to publish the vendor files. In this case only the config file.

```
$ php artisan vendor:publish --tag="larablog"
```

After you inspect the configuration file, it depends on your skills :). I recommend running the:

```
$ php artisan larablog:setup
```

The above command will install models, make the migration file and add a trait to your User model.

After the setup please run the migration command

```
$ php artisan migrate
```

Which will create the tables for this package: articles and categories. (you can change the names in your config file).

Once the tables are ready, please make sure to seed the initial category.

```
$ php artisan larablog:seeder
```

The above command will create a seeder class. After you created a seeder, please run the

```
$ composer du
```

And then run the seeder

```
$ php artisan db:seed --class=LarablogSeeder
```

Thats. basically it.

### Usage

[](#usage)

Create your controller resource or whatever and then simply:

```
$article = new Article([
            'title' => 'This is my title',
            'slug' => 'this-is-my-slug',
            'excerpt' => 'This is my excerpt',
            'content' => 'This is my content',
            'is_featured' => false,
            'status' => 'publish',
            'publish_at' => Carbon::now()
]);

// associate the user
$article->associateUser(1);
// save the article
$article->save();

// attach the category
$article->attachCategory('uncategorized'); // name or the ID

// or multiple categories
$article->attachCategories([1, 2, 3]); // names or ID's
```

To get the article you can, for example:

```
$article = Article::find(1);

// get the categories (cacheable)
$article->getCategories();
```

Or you can fetch all articles from a user

```
$user = User::find(1);

$articles = $user->getArticles();

// or
$articles = $user->getArticlesPaginated(20);

// or
$articles = $user->articles()->get();
```

Also you can use provided scopes

```
$articles = Article::whereCategoriesAre([1, 2, 3])->get(); // pass an array of IDs

// or

$articles = Article::whereCategoryIs(1)->get(); // pass an id
```

Facade
------

[](#facade)

Larablog provides you with convenient helpers to make your life easier

```
use Gorankrgovic\Larablog\Facades\Larablog;

// ... and then in your methods...

// to generate a unique slug which will append number at the end of the slug if the same slug exists
$slug = Larablog::slug($title);

// to convert string to paragraph delimited text
$text = Larablog::autop($content);

// to generate the excerpt
$excerpt = Larablog::excerpt($content);

// to just sanitize the title and to get a slug
$slug = Larablog::sanitize_title($title);
```

Basically thats it...

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

2876d ago

### Community

Maintainers

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

---

Top Contributors

[![gorankrgovic](https://avatars.githubusercontent.com/u/12137730?v=4)](https://github.com/gorankrgovic "gorankrgovic (2 commits)")

---

Tags

bloglaravellaravel56laravelbloglarablog

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/gorankrgovic-larablog/health.svg)

```
[![Health](https://phpackages.com/badges/gorankrgovic-larablog/health.svg)](https://phpackages.com/packages/gorankrgovic-larablog)
```

###  Alternatives

[austintoddj/canvas

A Laravel publishing platform

3.4k120.6k](/packages/austintoddj-canvas)[microweber/microweber

New generation CMS with drag and drop

3.4k13.8k1](/packages/microweber-microweber)[tomatophp/filament-cms

Full CMS System with support of importing integrations and multi meta functions

11410.4k4](/packages/tomatophp-filament-cms)

PHPackages © 2026

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