How to refresh laravel template and disabe caching ?
Posted: Sun Oct 04, 2015 1:31 pm
Hey guys i am just playing around with laravel and bascally have the following view:
Now suppose i change the below code:
To the following:
I have only changed the word Categories to Products , but when my view loads in the browser i still see the word "Category" instead of "Products" .
The only current solution i have is to change the view file name and than change the view name in the controller, which is quite inconvenient ! , Is there another solution to this problem ? Is this something to do with caching ?
Code: Select all
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Title</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<!-- Place favicon.ico in the root directory -->
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/style.css">
<style>
h1 {
color: #727272;
font: bold 2em/1.4 verdana;
}
.nav-items {
padding: 0;
margin: 0;
list-style-type: none;
}
.nav-items li {
display: inline-block;
margin-right: 10px;
padding: 1em 1.5em;
border: 1px solid #ccc;
background-color: #eee;
-webkit-box-shadow: 0 0 2px rgba(0,0,0,.2);
box-shadow: 0 0 2px rgba(0,0,0,.2);
color: #727272;
text-shadow: 0 0 1px rgba(255,255,255,1);
}
</style>
</head>
<body>
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<ul class="nav-items">
@foreach($categories as $category)
<li>
Category id is {{ $category-> id }}
</li>
@endforeach
</ul>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.11.3.min.js"><\/script>')</script>
</body>
</html>
Code: Select all
<ul class="nav-items">
@foreach($categories as $category)
<li>
Category id is {{ $category-> id }}
</li>
@endforeach
</ul>
To the following:
Code: Select all
<ul class="nav-items">
@foreach($categories as $category)
<li>
Product id is {{ $category-> id }} // I have only changed the word "Categories" to "Products"
</li>
@endforeach
</ul>
The only current solution i have is to change the view file name and than change the view name in the controller, which is quite inconvenient ! , Is there another solution to this problem ? Is this something to do with caching ?