Details

  • View On packagist
  • Created by Nicolas Widart
  • Added on Oct 04, 2017
  • Total Downloads: 5891
  • Monthly Downloads: 11
  • Daily Downloads: 0
  • Favourites: 13

Block

A module to create small blocks of content to display anywhere on the site.

Block Module

Latest Version Software License Quality Sblock SensioLabs Insight CodeClimate Total Downloads Slack

Branch Travis-ci
master Build Status
2.0 Build Status

Installation

Download

You can install the Block module, with the following command which allows the module to be edited for your project.

php artisan asgard:download:module asgardcms/blog --migrations

Composer

You can install the Block module with composer:

$ composer require asgardcms/block

Then run the following command to install the database tables:

$ php artisan module:migrate Block

Permissions

In the backend GUI, go to Users > Roles > Admin. Then the permissions tab, and give the Admin role the permissions for the block module.

Documentation

This is a very simple module to create re-usable blocks of content. The blocks of content are created in the administration. You give it a name and a content.

After this, you'll be able to get the content of a block with the following code:

{!! Block::get('block-name') !!}

Hooks

Hooks are special events, where it allows you to change the data stored before it's stored in the database.

BlockIsCreating

Triggered before a block is created.

BlockIsUpdating

Triggered before a block is updated.

BlockContentIsRendering

Triggered when a block body gets displayed.

Resources

Info

All AsgardCMS modules respect Semantic Versioning.

Block Module

Latest Version Software License Quality Sblock SensioLabs Insight CodeClimate Total Downloads Slack

Branch Travis-ci
master Build Status
2.0 Build Status

Installation

Download

You can install the Block module, with the following command which allows the module to be edited for your project.

php artisan asgard:download:module asgardcms/blog --migrations

Composer

You can install the Block module with composer:

$ composer require asgardcms/block

Then run the following command to install the database tables:

$ php artisan module:migrate Block

Permissions

In the backend GUI, go to Users > Roles > Admin. Then the permissions tab, and give the Admin role the permissions for the block module.

Documentation

This is a very simple module to create re-usable blocks of content. The blocks of content are created in the administration. You give it a name and a content.

After this, you'll be able to get the content of a block with the following code:

{!! Block::get('block-name') !!}

Hooks

Hooks are special events, where it allows you to change the data stored before it's stored in the database.

BlockIsCreating

Triggered before a block is created.

BlockIsUpdating

Triggered before a block is updated.

BlockContentIsRendering

Triggered when a block body gets displayed.

Resources

Info

All AsgardCMS modules respect Semantic Versioning.

Module Download

Install any module with the php artisan asgard:download:module command.

php artisan asgard:download:module asgardcms/block --migrations

This will download the module and run its migrations.

Composer

composer require asgardcms/block

This is if the module is perfect for your use-case as-is, and doesn't need any changes to fit your needs.

Note: Don't forget to give yourself the required permissions before you can view the backend entries.

Mobile Analytics