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.
雕花笼2020-10-30 08:30:18
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.