[PHP] Laravel 获取模型/表的所有字段
获取指定表的所有字段名:
use Illuminate\Support\Facades\Schema; // 表名不带前缀 $columns = Schema::getColumnListing('admins');
Facade参考:https://laravel.com/docs/9.x/facades#facade-class-reference
获取指定表的所有字段名:
use Illuminate\Support\Facades\Schema; // 表名不带前缀 $columns = Schema::getColumnListing('admins');
Facade参考:https://laravel.com/docs/9.x/facades#facade-class-reference