国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Front desk - php form automatically built
某草草
某草草 2017-07-05 09:56:04
0
3
1045

Thinkphp framework is often used for project development. Each functional module basically requires addition, deletion, modification and query operations. The pages are basically the same, except for the different form fields. However, each module needs to be modified one by one each time. Adding fields and names to the edit list page requires a lot of repetitive work and is very time-consuming.
Sample code:

        <p class="ibox-content">

            <table class="table table-bordered">
                <thead>
                    <tr class="success">
                        <th>id</th>
                        <th>權(quán)限名稱</th>
                        <th>模塊名稱</th>
                        <th>控制器名稱</th>
                        <th>方法名稱</th>
                        <th>上級權(quán)限id</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                <foreach name="lists" item="vo" >
                    <tr class="">
                        <td>{$vo.id}</td>
                        <td>{$vo.auth_name}</td>
                        <td>{$vo.module}</td>
                        <td>{$vo.controller}</td>
                        <td>{$vo.action}</td>
                        <td>{$vo.pid}</td>
                        <td><a href="{:U('Rbac/Auth/editC',['id'=>$vo['id']])}" class="btn btn-w-m btn-info">編輯</a>&nbsp<a href="{:U('Rbac/Auth/delC',['id'=>$vo['id']])}" class="btn btn-w-m btn-danger" onclick="return confirm('確定要刪除嗎?');">刪除</a></td>
                    </tr>
                </foreach>

                </tbody>
            </table>

How to automatically generate dynamic forms and lists based on database tables.
How do you deal with this part of the repetitive work when doing projects? Is there any better way or front-end framework that can handle this problem? Best Can you provide a reference code? Thank you all.
I found an idea: to directly generate a form based on the model (database table) configuration, write a configuration file for one database table?

某草草
某草草

reply all(3)
洪濤

I changed it manually

大家講道理

yii2 officially comes with gii, which can easily generate models, controllers, grud, etc.

ringa_lee

I don’t like GII too much, long-term use is not conducive to improving the coding ability

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template