Download the PHP package waltersilvacruz/laravel-shortcodes without Composer
On this page you can find all versions of the php package waltersilvacruz/laravel-shortcodes. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download waltersilvacruz/laravel-shortcodes
More information about waltersilvacruz/laravel-shortcodes
Files in waltersilvacruz/laravel-shortcodes
Package laravel-shortcodes
Short Description Wordpress like shortcodes for Laravel 5, 6, 7, 8, 9, 10 and 11 (fork of webwizo/laravel-shortcodes)
License MIT
Homepage https://github.com/waltersilvacruz/laravel-shortcodes
Informations about the package laravel-shortcodes
Laravel-Shortcodes
WordPress like shortcodes for Laravel 5.x
If you are looking for Laravel 4.2, see: https://github.com/patrickbrouwers/Laravel-Shortcodes
Install
Via Composer
After updating composer, add the ServiceProvider to the providers array in config/app.php
Usage
You can use the facade for shorter code. Add this to your aliases:
The class is bound to the ioC as shortcode
Usage
withShortcodes()
To enable the view compiling features:
This will enable shortcode rendering for that view only.
Enable through class
Disable through class
Disabling some views from shortcode compiling
With the config set to true, you can disable the compiling per view.
Default compiling
To use default compiling:
Strip shortcodes from rendered view.
Strip shortcode through class
Registering new shortcodes
Create a new ServiceProvider where you can register all the shortcodes.
After defining shortcodes, add the ServiceProvider to the providers array in config/app.php
Usage
Callback
Shortcodes can be registered within ShortcodesServiceProvider with a callback:
ShortcodesServiceProvider.php Class File
Default class for BoldShortcode
You can store each shortcode within their class app/Shortcodes/BoldShortcode.php
Class with custom method
You can store each shortcode within their class app/Shortcodes/ItalicShortcode.php
Register helpers
If you only want to show the html attribute when the attribute is provided in the shortcode, you can use $shortcode->get($attributeKey, $fallbackValue = null)
Change log
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONDUCT for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Asif Iqbal
- All Contributors
Support me
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-shortcodes with dependencies
illuminate/support Version 5.6.x|5.7.x|5.8.x|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
illuminate/contracts Version 5.6.x|5.7.x|5.8.x|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
php Version ^7.2|^8.0|^8.1|^8.2|^8.3