Jul 8, 2016
0
Level 2
php jquery plugin to laravel?
i am still strugling a bit with the style switcher but found something kind of usefull.
http://code.tutsplus.com/tutorials/how-to-create-an-amazing-jquery-style-switcher--net-532
but my question is in the above tutorial on a switcher he uses the following php code in style-switcher.php:
<?php
$style = $_GET['style'];
setcookie("style", $style, time()+604800); // 604800 = amount of seconds in one week
if(isset($_GET['js'])) {
echo $style;
} else {
header("Location: ".$_SERVER['HTTP_REFERER']);
}
?>
he then uses to call the stylesheet change.
<li id="day"><a href="style-switcher.php?style=day">Day</a></li>
how could this be translated to laravel?
Please or to participate in this conversation.