随笔分类 - filamentv3后端管理系统所有随笔
摘要:数字的功能 TextInput::make('图片') ->numeric()->inputMode('int')->numeric() ->default('1') ->hintIcon('heroicon-m-question-mark-circle') ->hint('单条广告使用图片数量,仅
阅读全文
摘要:###### 那如果只有该用户才能搜索到怎么写? 可能会报错 这个选项在那个model 就用那个model model是嵌套的 ``` php artisan make:model Cloudflare -m ``` ``` $table->id(); $table->string('name');
阅读全文
摘要:解决relationship的同时存储数据 可能是在引用model的时候少了一些内容,导致无法传递进数据库,但是另一个函数可以做到保存入数据库,我不知道后端那个内容该怎么写,我需要看一下Laravel和filamentv3之间的关系。 我得知我写的只是检索,真正传递不是这个。 **多对多什么意思**
阅读全文
摘要:关于条件搜索 + 多选 + 多对多的写法 比如tags那种 filament ``` Select::make('tags') // ->relationship('tags', 'name' ) //->options(Tags::all()->pluck('name', 'id')) ->rel
阅读全文
摘要:单选按钮 ``` Radio::make('HTTPS') ->options([ '不支持' => '不支持', '支持' => '支持', ]) ```
阅读全文
摘要:上传单个文件 model文件里面 多个文件需要和tag一样写明是数组 ``` FileUpload::make('file') ->label('文件') ->image(), ```
阅读全文
摘要:selete一些从数据库里读写 ->options(Audience::all()->pluck('name', 'id')) 有bug数据不能全部展示。 ->optionsLimit(300)
阅读全文
摘要:### 报错Array to string conversion 原因:数组格式无法存储进数据库 technologies是字段名 ``` use Illuminate\Database\Eloquent\Model; class App extends Model { protected $cas
阅读全文
摘要:# 无法创建其他表的数据怎么解决 [第一个原因你没有写他们的主从关系](https://www.cnblogs.com/xxdmua/p/17672170.html) [第二个原因就是你没有设置他们的和数据库对应的名字](https://www.cnblogs.com/xxdmua/p/176721
阅读全文
摘要:## 第一个原因你没有写他们的主从关系 主 ``` belongsTo(Audience::class); } } ``` 从 ``` hasMany(PromotionTask::class); } } ``` 这样写 id依据 显示出来是name ``` // ->options(Audienc
阅读全文
摘要:->label('Email address')
阅读全文
摘要:### 有铅笔图标的输入框 ``` TextInput::make('name') ->prefixIcon('heroicon-m-pencil') >required() ->placeholder('输入名称'), ```
阅读全文
摘要:### 下拉搜索框 [国家的数据](https://www.cnblogs.com/xxdmua/p/17671916.html) [语言的数据](https://www.cnblogs.com/xxdmua/p/17671911.html) ``` Select::make('任务类型') ->o
阅读全文
摘要:### 最小年龄1-65的 [验证规则](https://filamentphp.com/docs/3.x/forms/validation#custom-rules) ``` TextInput::make('最小年龄') ->type("number") ->step(1) ->rules([
阅读全文
摘要:### 文本区域输入框 ``` Textarea::make('备注') ->placeholder('输入备注') ->required(),
阅读全文
摘要:#### 国家的数据 ``` Select::make('排除国家') ->options([ 'WorldWide 全球' => 'WorldWide 全球', 'Africa 非洲' => 'Africa 非洲', 'AFTA 东盟自由贸易区' => 'AFTA 东盟自由贸易区', 'Andro
阅读全文
摘要:#### 语言的数据 ``` '英语(美国)' => '英语(美国)', '加泰罗尼亚语' => '加泰罗尼亚语', '捷克语' => '捷克语', '宿务语' => '宿务语', '威尔士语' => '威尔士语', '丹麦语' => '丹麦语', '德语' => '德语', '巴斯克语' => '
阅读全文
摘要:## selete连接其他的数据表 代码里加上 use App\Models\Audience; 加上方法: **->options(User::all()->pluck('name', 'id'))这段代码什么意思** 这一行设置了下拉选择框的选项。它使用了 `User` 模型来获取所有用户(或作
阅读全文
摘要:## 如何创建数据库(2点) [sqlyog试用期已过](https://www.cnblogs.com/xxdmua/p/17671878.html) [创建数据库的代码](https://www.cnblogs.com/xxdmua/p/17671888.html)
阅读全文
摘要:``` php artisan make:model Audience -m ``` 创建语句编写 ``` $table->id(); $table->string('name'); $table->string('country'); $table->string('exclude_country
阅读全文

浙公网安备 33010602011771号