PHP code example of murdercode / laravel-shortcode-plus

1. Go to this page and download the library: Download murdercode/laravel-shortcode-plus library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

murdercode / laravel-shortcode-plus example snippets


return [
];

use Murdercode\LaravelShortcodePlus\Facades\LaravelShortcodePlus;

$html = "I want to parse this twitter tag: [twitter url=\"https://twitter.com/elonmusk/status/1585841080431321088\"]";
return LaravelShortcodePlus::source($html)->parseAll();

return LaravelShortcodePlus::source($html)->withAutoHeadingIds()->parseAll();

    'linksToParse' => [
        'sponsored' => [
            '#https://www\\.amazon\\.[A-Za-z]+#i',
            '#https://www\\.ebay\\.[A-Za-z]+#i',
            'https://www.instant-gaming.com',
        ],
        'dofollow' => [
            'https://forum.tomshw.it/',
        ],
        'nofollow' => [
            'https://www.youtube.com',
            'https://multiplayer.it',
            'https://www.everyeye.it',
        ],
    ],

    $content = LaravelShortcodePlus::source($content)
        ->forceRel()
        ->parseAll();
bash
php artisan vendor:publish --tag="shortcode-plus-assets"
bash
php artisan vendor:publish --tag="shortcode-plus-migrations"
php artisan migrate
bash
php artisan vendor:publish --tag="shortcode-plus-config"
json
    "scripts": {
"post-update-cmd": [
"@php artisan vendor:publish --tag=shortcode-plus-assets --ansi --force",
bash
php artisan vendor:publish --tag="shortcode-plus-views"