PHP code example of machy8 / macdom-bundle

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

    

machy8 / macdom-bundle example snippets


use Macdom\Engine;

/**
 * @Route("/", name="homepage")
 */
public function homepage(Engine $macdom) : Response
{
    return new Response($macdom->compile('h1 Hello World!'));
}