Support the ongoing development of Laravel.io →
posted 8 years ago
Views Blade
Last updated 1 year ago.
0

you really shouldnt have two versions of the same site, instead use a CSS framework/responsive design to change that one version to respond to many layouts..

0

Ok but what i have in mind is to make it respond to sub domain because is a social site.

0

This is how i solved it

<?php if (preg_match('/localhost/', $_SERVER['HTTP_HOST'])) { $this->theme = Theme::type('mobile')->current(\ThemeManager::getActive('mobile'))->reBoot()->layout('layouts.default'); } elseif (preg_match('/127.0.0.1/', $_SERVER['HTTP_HOST'])) { $this->theme = Theme::type('frontend')->current(\ThemeManager::getActive('frontend'))->reBoot()->layout('layouts.default'); }
Last updated 8 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

pejonic pejonic Joined 27 Dec 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.