当前位置:网站首页>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 .
边栏推荐
- [daily question] 1200 Minimum absolute difference
- redis6主从复制及集群
- Redis6 data type and operation summary
- When using Tencent cloud for the first time, you can only use webshell connection instead of SSH connection.
- 这18个网站能让你的页面背景炫酷起来
- Idea set method annotation and class annotation
- “百度杯”CTF比赛 九月场,Web:Upload
- Laravel框架运行报错:No application encryption key has been specified
- restTemplate详解
- What are the private addresses
猜你喜欢
How to apply the updated fluent 3.0 to applet development
什么是网络端口
Cloudcompare - point cloud slice
[深度学习论文笔记]TransBTSV2: Wider Instead of Deeper Transformer for Medical Image Segmentation
Laravel框架运行报错:No application encryption key has been specified
Idea set method annotation and class annotation
Mmseg - Mutli view time series data inspection and visualization
ELFK部署
The development of speech recognition app with uni app is simple and fast.
MMSeg——Mutli-view时序数据检查与可视化
随机推荐
PostgreSQL Usage Summary (PIT)
Aspx simple user login
What are the private addresses
C object storage
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
Record in-depth learning - some bug handling
通讯录(链表实现)
私有地址有那些
stm32逆向入门
[深度学习论文笔记]使用多模态MR成像分割脑肿瘤的HNF-Netv2
"Baidu Cup" CTF competition in September, web:upload
如何把大的‘tar‘存档文件分割成特定大小的多个文件
"Baidu Cup" CTF competition in September, web:sql
运筹说 第68期|2022年最新影响因子正式发布 快看管科领域期刊的变化
【Hot100】34. Find the first and last positions of elements in a sorted array
Redis6 data type and operation summary
The "Baidu Cup" CTF competition was held in February 2017, Web: explosion-2
Prefix, infix, suffix expression "recommended collection"
Network security HSRP protocol
Usage, installation and use of TortoiseSVN