PHP code example of delejt / y2apidoc

1. Go to this page and download the library: Download delejt/y2apidoc 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/ */

    

delejt / y2apidoc example snippets


php artisan y2apidoc:generate

php artisan vendor:publish --provider="Delejt\Y2apidoc\ServiceProvider" --tag="config"

php artisan vendor:publish --provider="Delejt\Y2apidoc\ServiceProvider" --tag="template"

 namespace Some\Custom\Namespace;

class MikiMouseTag
{
    public function parse($body)
    {
        return 'Hello I am MikiMouse';
    }

}

 namespace Some\Custom\Namespace;

class MikiMouseTag
{
    public function parse($body)
    {
        return $this->render($body);
    }

    protected function render($body)
    {
        $template_name = 'mikimouse';

        try {
            return view($template_name)->with('text', $body);
        }
        catch (\Exception $e) {
            return $body;
        }
    }
    
}

mikimouse.blade.php

javascript.blade.php