I'm adding a mobile-friendly website to my laravel app, so I added the following code to /app/config/views.php
use Jenssegers\Agent\Agent as Agent;
$Agent = new Agent();
// agent detection influences the view storage path
if ($Agent->isMobile()) {
$viewPath = __DIR__.'/../views/mobile';
} else {
$viewPath = __DIR__.'/../views';
}
And that works great. The problem is, that I'm trying to send an email and laravel expects the email's view file also to be under /mobile directory, is there any way I can tell emails to still always load from /views/ and not /views/mobile?
I go to this forum all the time on a mobile device. Try it yourself. Well written html works great on a mobile site.
Usually the key is us absolute sizing rather than percent.
This:
div#tbl-container {
width: 800px;
height: 300px;
overflow: auto;
Not:
div#tbl-container {
width: 90%;
height: 50%;
overflow: auto;
Test it, bring up this site on a mobile device, you can expand and contract size very easy.
I have been on some so called mobile sites where you cannot expand and contract.
Well written html is the answer weather mobile or not.
Hmm that's not really what I mean, but thanks anyway jimgwhit,
There's an answer on http://stackoverflow.com/questions/27232429/laravel-mobile-support
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community