devfactory/block

Block for your website
202 5
Install
composer require devfactory/block
Latest Version:3.1.1
PHP:^7.3|^8.0|^8.1
Laravel:7 · 8
License:MIT
Last Updated:Nov 18, 2021
Links: GitHub  ·  Packagist
Maintainer: devfactory

#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') }}

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

641,106,524 9,700
laravel/framework

The Laravel Framework.

593,882,149 34,959
laravel/tinker

Powerful REPL for the Laravel framework.

502,645,077 7,441
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

418,291,778 609
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

394,964,158 4,660

Version History

Version Released PHP Laravel License
3.1.1 ^7.3|^8.0|^8.1 ^7.0|^8.0 MIT
3.1.0 ^7.3|^8.0|^8.1 ^7.0|^8.0 MIT
3.0.12 ^7.3|^8.0|^8.1 ^7.0|^8.0
3.0.11 ^7.3|^8.0|^8.1 ^7.0|^8.0
3.0.10 ^7.3|^8.0|^8.1 ^7.0|^8.0