Laravel Backpack MyAccountController

huangapple go评论72阅读模式
英文:

Laravel Backpack MyAccountController

问题

我对背包不太了解,我试图在我的帐户设置页面中添加一个字段,但似乎找不到控制器或视图,任何帮助将不胜感激,谢谢!我尝试查看app/http/controllers,但没有找到。

英文:

I am quite new to backpack and I'm trying to add a field to my Account settings page but can't seem to find the controller nor the view, any help is appreciated, thanks !

I tried looking into app/http/controllers but had no luck.

答案1

得分: 1

根据他们的文档:https://backpackforlaravel.com/docs/5.x/base-about,你需要创建一个my_account.blade.php文件:

> 如果你只想要添加一些新的输入框,你可以通过创建一个文件在resources/views/vendor/backpack/base/my_account.blade.php,该文件使用Backpack包中相同文件的代码,但是添加你需要的输入框。记得在你的User模型中也把这些字段设置为$fillable。

英文:

According to their docs: https://backpackforlaravel.com/docs/5.x/base-about, you need to create a my_account.blade.php file:

> If you only want to add a few new inputs, you can do that by creating
> a file in resources/views/vendor/backpack/base/my_account.blade.php
> that uses code from the same file in the Backpack package, but adds
> the inputs you need. Remember to also make these fields $fillable in
> your User model.

huangapple
  • 本文由 发表于 2023年4月4日 11:00:51
  • 转载请务必保留本文链接:https://go.coder-hub.com/75925201.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定