How does laravel determine the mobile terminal and pc terminal?
春天
春天 2020-10-28 22:46:20
0
1
1666

The website has two sets of templates, mobile and PC. How to jump to the mobile and PC templates through a domain name, how to write the code in the controller, please give me some advice from teachers, friends, and masters. Thank you.

春天
春天

reply all(1)
雕花笼

I don’t know about laravel, I have never used this framework. I believe there should be a place to set the template directory, right? You can add a judgment in the template directory or view directory. Use UA to determine whether it is a PC or a mobile phone. If it is a PC If accessed by mobile phone, the template path is set to A. If it is accessed by mobile phone, the template path is set to B.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template