PHP code example of wutongwan / lego

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

    

wutongwan / lego example snippets


$form = Lego::form(new User());

$form->addText('number', '编号')->();

return $form->view('layout', ['form' => $form]);
bash
php artisan vendor:publish --tag=lego-assets --force

> {
>      "scripts": {
>          "post-update-cmd": [
>              "@php artisan vendor:publish --tag=lego-assets --force"
>          ]
>      }
>  }
> 
bash
  php demo/run.php [--host=127.0.0.1] [--port=8080]