当前位置:网站首页>Laravel generate entity
Laravel generate entity
2022-07-05 13:43:00 【Php_ XiaoZhi】
One 、 Generate by command User Model class
php artisan make:model Http/Models/User
If the table name is user, You need to set the mandatory table name to user, Otherwise, it will access by default users surface
protected $table = 'user';?
Two 、 Install the model class code prompt plug-in
Install the model class code prompt plug-in plug-in
composer require barryvdh/laravel-ide-helper
Generate comments for the data model
php artisan ide-helper:models Generate all
php artisan ide-helper:models "App\Models\User" Generate single
by Facades Generate annotations
php artisan ide-helper:generate
3、 ... and 、 test
User::where()->get();
It's normal .
边栏推荐
- Internal JSON-RPC error. {"code":-32000, "message": "execution reverted"} solve the error
- Zhubo Huangyu: these spot gold investment skills are not really bad
- go map
- 什么叫做信息安全?包含哪些内容?与网络安全有什么区别?
- RK3566添加LED
- 不知道这4种缓存模式,敢说懂缓存吗?
- How to apply the updated fluent 3.0 to applet development
- Don't know these four caching modes, dare you say you understand caching?
- 个人组件 - 消息提示
- Datapipeline was selected into the 2022 digital intelligence atlas and database development report of China Academy of communications and communications
猜你喜欢

NFT value and white paper acquisition

MySQL --- 数据库查询 - 排序查询、分页查询

Aikesheng sqle audit tool successfully completed the evaluation of "SQL quality management platform grading ability" of the Academy of communications and communications

内网穿透工具 netapp

Data Lake (VII): Iceberg concept and review what is a data Lake

STM32 reverse entry

嵌入式软件架构设计-消息交互

那些考研后才知道的事

ELFK部署

记录一下在深度学习-一些bug处理
随机推荐
百度杯”CTF比赛 2017 二月场,Web:爆破-2
记录一下在深度学习-一些bug处理
go 字符串操作
Solve the problem of invalid uni app configuration page and tabbar
A detailed explanation of ASCII code, Unicode and UTF-8
Scientific running robot pancakeswap clip robot latest detailed tutorial
Jasypt configuration file encryption | quick start | actual combat
Redis6 data type and operation summary
Could not set property 'ID' of 'class xx' with value 'XX' argument type mismatch solution
go 数组与切片
53. 最大子数组和:给你一个整数数组 nums ,请你找出一个具有最大和的连续子数组(子数组最少包含一个元素),返回其最大和。
ZABBIX monitoring
Solution to the prompt of could not close zip file during phpword use
Address book (linked list implementation)
"Baidu Cup" CTF competition in September, web:sql
Prefix, infix, suffix expression "recommended collection"
【华南理工大学】考研初试复试资料分享
个人组件 - 消息提示
Matlab paper chart standard format output (dry goods)
49. Grouping of alphabetic ectopic words: give you a string array, please combine the alphabetic ectopic words together. You can return a list of results in any order. An alphabetic ectopic word is a