3 years ago

Changing blade files never change when refreshing/clearing cache

Posted 3 years ago by P1llus

Hello everyone,

I seem to have some some troubles with changing blade files, and first i thought it was my own browser caching, or i have enabled caching for some reason on my server, but i have already tested these things:

Clearing browser cache

Checking with a new browser

Using artisan to clear cache.

Set cache option in env file.

Change cache option in php.ini.

Reboot server.

And STILL it is showing the older pages, even after editing them.

Here is the codes:


Route::get('articles', 'ArticlesController@index');



namespace App\Http\Controllers;

use App\Article;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;

class ArticlesController extends Controller
    public function index()
        $articles = Article::all();

        return view('articles.index', compact('articles'));

    public function show($id)
        $article = Article::findOrFail($id);

        return view('articles.show', compact('article'));

And the view (master and specifc view):

<!doctype html>
<html lang="en">
    <meta charset="UTF-8">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
    <div class="container">





    @foreach ($articles as $article)
                {{ $article->title  }}

            <div class="body">{{ $article->body  }}</div>

Now for example, if i change the h1 title in my index.blade.php it will still show the old title. If i remove the foreach and just put in random html, it still shows old content. Only when i change the controller to return something other than the view, just text for exmple, the browser is updated with the new content.

I really hope someone got any pointers to me on what to look for here! :)

Please sign in or create an account to participate in this conversation.