Download the PHP package gornymedia/laravel-shortcodes without Composer
On this page you can find all versions of the php package gornymedia/laravel-shortcodes. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gornymedia/laravel-shortcodes
More information about gornymedia/laravel-shortcodes
Files in gornymedia/laravel-shortcodes
Package laravel-shortcodes
Short Description Laravel shortcodes package
License MIT
Informations about the package laravel-shortcodes
Laravel-Shortcodes
Laravel Shortcodes Package
Laravel compatibility
Laravel | Shortcodes |
---|---|
12.x | 1.5 |
11.x | 1.5 |
10.x | 1.4 |
9.x | 1.4 |
8.x | 1.4 |
7.x | 1.4 |
6.x | 1.4 |
5.8.x | 1.3 |
5.5.x | 1.2 |
5.4.x | 1.1 |
5.3.x | 1.1 |
5.2.x | 1.1 |
5.1.x | 1.0 |
5.0.x | 1.0 |
Installation
Require this package with Composer
Add the service provider to bootstrap/providers.php
To use the facades, add this within the register method of app/Providers/AppServiceProvider
Copy the package config to your local config with the publish command
Usage
Creating shortcodes
Inside an app/Providers/AppServiceProvider
boot function you can create the shortcodes with attributes.
Include partial files in shortcode
Compile shortcodes inside shortcode content
View rendering
compileShortcodes()
To render the view and compile the Shortcodes:
stripShortcodes()
To render the view and remove the Shortcodes
In the config/gornymedia-laravel-shortcodes.php
file you can set the default mode (null
, compile
or strip
).
The following example will compile shortcodes without using the compileShortcodes()
method
License
This package is open-source software licensed under MIT License.
This package uses WordPress shortcodes methods. The license under which the WordPress software is released is the GPLv2 (or later).
Support
Support me with any amount and help me develop.