Skip to content
Blogging plugin for Laravel Nova
PHP HTML JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src-js
src-php idk how we missed this in the pr review Jan 8, 2020
.babelrc init blud Oct 5, 2018
.editorconfig init blud Oct 5, 2018
.eslintignore init blud Oct 5, 2018
.eslintrc init blud Oct 5, 2018
.gitignore
.lintstagedrc
.markdownlintrc
.npmignore
LICENSE
README.md Update README.md Mar 28, 2019
composer.json Enable Article authors by default Nov 20, 2019
package.json
phpcs.xml
rollup.config.js init blud Oct 5, 2018

README.md

Blogging module for Laravel Nova

Easily add a Blog with Articles and Categories in Nova using repeaters blocks for content. See documentation for Repeater Blocks for details.

Installation

composer require dewsign/nova-blog

Run the migrations

php artisan migrate

Load the tool in your NovaServiceProvider.php

public function tools()
{
    return [
        ...
        new \Dewsign\NovaBlog\Nova\NovaBlogTool,
        ...
    ];
}

Templates

The packages doesn't come with any pre-made templates. Simply replace the published views.

Configuration

Repeaters

Add additional repeater blocks by adding it to the nova blog config

'repeaters' => [
    'More\Repeaters'
],

Or remove all standard repeaters and use your own selection.

'replaceRepeaters' => true,

Customisation

If you want more control, you can specify which Nova Resources and Models to use. Because of the way nova reads the model from a static variable you must provide your own custom resource if you want to use a custom model.

'models' => [
    'article' => 'App\Article',
],
'resources' => [
    'article' => 'App\Nova\Article',
],

Nova Resource Group

'group' => 'Blog',

You can customise the nova resource group.

Routing

Blog, category and article routing is all included under the /blog slug.

Factories & Seeders

The package comes with pre-made factories and seeders. Should you wish to include them in your application simply call the seeder or use the factory provided.

// database/seeds/DatabaseSeeder.php

public function run()
{
    $this->call(Dewsign\NovaBlog\Database\Seeds\CategorySeeder::class);
    $this->call(Dewsign\NovaBlog\Database\Seeds\ArticleSeeder::class);
}

Permissions

A BlogPolicy is included, but not loaded by default, for Brandenburg / Nova Tool. Simply load the AuthServiceProvider from this package.

// config/app.php

'providers' => [
    ...
    Dewsign\NovaBlog\Providers\AuthServiceProvider::class,
],
You can’t perform that action at this time.