Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to customize the views? #39

Closed
lochen opened this issue Apr 24, 2020 · 8 comments
Closed

How to customize the views? #39

lochen opened this issue Apr 24, 2020 · 8 comments
Labels
question Further information is requested

Comments

@lochen
Copy link

lochen commented Apr 24, 2020

How to customize the views?

z-song/laravel-admin#943

seem not to work for dcat-admin

app('view')->prependNamespace('admin', resource_path('views/admin'));

@jqhph jqhph added the question Further information is requested label Apr 24, 2020
@jqhph
Copy link
Owner

jqhph commented Apr 24, 2020

view()->replaceNamespace('admin', resource_path('views/admin'));

@lochen
Copy link
Author

lochen commented Apr 24, 2020

view()->replaceNamespace('admin', resource_path('views/admin'));

加了在Admin/bootstrap.php
已复制vendor/dcat/laravel-admin/resources/views/resources/views/admin

页面就空白了

Laravel: 5.6.x

@jqhph
Copy link
Owner

jqhph commented Apr 24, 2020

有没有报错?经测试laravel6正常,如果是新项目建议你升级到6或7版本

@lochen
Copy link
Author

lochen commented Apr 24, 2020

没有报错,页面空白,没有报错log🤔

@lochen
Copy link
Author

lochen commented Apr 28, 2020

旧项目,暂时不能升级Laravel, 在6以下有解决办吗?

@jqhph
Copy link
Owner

jqhph commented Apr 28, 2020

其实不是特别建议你覆盖view,不然以后升级新版本都会比较麻烦。你可以升级到laravel5.8试试,理论上是没啥问题的

@orzcc
Copy link

orzcc commented Apr 19, 2021

其实不是特别建议你覆盖view,不然以后升级新版本都会比较麻烦。你可以升级到laravel5.8试试,理论上是没啥问题的

Laravel-admin 可以选择性覆盖(只放修改的 view),但是本框架需要全部复制过来,所以更新才会更麻烦。但有些小改变需要修改默认模板,请问有更好的办法吗?

@puzzle9
Copy link
Contributor

puzzle9 commented Jun 13, 2021

其实不是特别建议你覆盖view,不然以后升级新版本都会比较麻烦。你可以升级到laravel5.8试试,理论上是没啥问题的

Laravel-admin 可以选择性覆盖(只放修改的 view),但是本框架需要全部复制过来,所以更新才会更麻烦。但有些小改变需要修改默认模板,请问有更好的办法吗?

view()->prependNamespace('admin', resource_path('views/admin'));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants