R
R
Roman Govorov2021-02-16 13:13:14
Laravel
Roman Govorov, 2021-02-16 13:13:14

How to implement shortcodes like in WordPress on Laravel 8.0?

WordPress has shortcodes through which you can insert content with add-ons, or simply display some ready-made block. Are there similar solutions for Laravel?
If not, can you tell me how this can be done?

This is necessary so that the repeating code can be inserted into the content in one line, conditionally:
[shortcode file="action.html"]

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alex, 2021-02-16
@Kozack

Look at the implementation of the do_shortcode function

A
alvvi, 2021-02-16
@alvvi

webwizo/laravel-shortcodes

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question