Thinkphp custom code generation tool and usage instructions (Appendix), thinkphp Generation Tool
This example describes Thinkphp custom code generation tools and usage instructions. We will share this with you for your reference. The details are as follows:
Recently, I was frustrated to find that Thinkphp is often used to repeat things, such as repeating the simplest CRUD method, writing forms, and writing foreground style sheets.
Thinkphp's support for background operations is very powerful, and the recently popular Bootstrap framework makes the foreground style easy to follow a standard, so I decided to write a code generator of my own.
I hope it is easy enough for anyone to understand at a Glance. It is good for MySql and Sqlite databases to generate CRUD code stably, it would be better to generate some View code that complies with the Bootstrap framework.
Thinkphelper was born after about a dozen hours of struggle!
It only has one file and supports MySQL and sqlite databases. It can quickly generate the front and back-end CRUD code snippets to reduce repetitive work. There is only one file, which is lightweight and convenient.
You only need to configure the database information and put it in the Action directory of your project file, and then call it like this:
Http: // [your project address]/index. php/ThinkphpHelper
I wrote all the style sheets to this file so that they can be copied and pasted to any Thinkphp project, bootstrap and jquery files are used to read CDN files on the network, so it is best to ensure that your network is smooth when you use it. If you do not have a network, you can modify the relevant address on your own.
Smart, you must know how it works, right?
Appendix: Click here for the Thinkphp Code GeneratorDownload from this site.
Directly generate the front and back-end CRUD code snippets. You can also customize code templates as needed to reduce repetitive work. Supports MySQL and sqlite databases to quickly build a project prototype.
PS: We recommend several formatting, beautification, and conversion tools on this site to help you sort out messy code. I believe you can use them in future development:
Php code online formatting and beautification tools:
Http://tools.jb51.net/code/phpformat
Online XML/JSON conversion tools:
Http://tools.jb51.net/code/xmljson
Json code online formatting/beautification/compression/editing/conversion tools:
Http://tools.jb51.net/code/jsoncodeformat
SQL code online formatting and beautification tools:
Http://tools.jb51.net/code/sqlcodeformat