英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论