PHP code example of ichynul / row-table

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

    

ichynul / row-table example snippets


protected function form()
{
        $form = new Form(new Task);

        $headers = ['备注', '服务费用', '服务评分'];
        $tableRow = new TableRow();

        $tableRow->text('status', '任务状态')->options(Task::$statusMap)->attribute(['readonly' => 'readonly']);
        $tableRow->text('fee', '服务费用')->rules(''eRow, $tableRow2])
            ->useDiv(true); //使用div显示,默认 table
            //->headersTh(true);//使用table时 头部使用<th></th>,默认使用<td></td>样式有些差别
            //->getTableWidget()//extends Encore\Admin\Widgets\Table
            //->offsetSet("style", "width:1000px;");

        // 另外一种代码风格 Another code style
         $form->rowtable('任务信息2', function ($table) {
            $table->row(function (TableRow $row) {
                $row->text('text1', 'label1')->rules(' "width:1000px;");
        });

        $form->textarea('remark', '备注')->rules('