murdercode/laravel-shortcode-plus

View on GitHub
src/Shortcodes/SurveyShortcode.php

Summary

Maintainability
A
0 mins
Test Coverage
F
0%
<?php

namespace Murdercode\LaravelShortcodePlus\Shortcodes;

class SurveyShortcode
{
    public function register($shortcode): string
    {
        $ids = explode(',', $shortcode->id) ?? '';

        if (empty($ids)) {
            return 'No Survey parameter id defined';
        }

        return view('shortcode-plus::survey', compact('ids'))->render();
    }
}