devfactory / block
Block for your website
Installs: 202
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 4
Forks: 0
Open Issues: 0
pkg:composer/devfactory/block
Requires
- php: ^7.3|^8.0|^8.1
- illuminate/database: ^7.0|^8.0
- illuminate/support: ^7.0|^8.0
- laravelcollective/html: ^6.2
README
#Block
This package allows you to create block and choose the position of the block where you need it.
Installation
Using Composer to install the package.
composer require devfactory/block
Then in your app/config/app.php
file register the following service providers:
Devfactory\Block\BlockServiceProvider::class,
// config/app.php 'providers' => [ ... Devfactory\Block\BlockServiceProvider::class, ], 'aliases' => [ ... 'Block' => Devfactory\Block\Facades\Block::class, ],
If you want you can publish the config, views and migration files if you want to change them
php artisan vendor:publish --provider="Devfactory\Block\BlockServiceProvider" --tag="config"
php artisan vendor:publish --provider="Devfactory\Block\BlockServiceProvider" --tag="views"
php artisan vendor:publish --provider="Devfactory\Block\BlockServiceProvider" --tag="migrations"
Usage
You just need to create a block then you can call the block content with the block facade like this
{{ Block::get('block_title') }}