, ,

In Laravel, If your blade page is not rendering locally, when you pass the page from the route and controller then how can we fix it?

Posted by

Layout Blade Page

if you’re a beginner or intermediator on the journey of Laravel, you will introduce to fewer or more bugs or issues then how can you fix them? suppose we’re facing issues like that I have mentioned image above. Easily, you get the solution with one step. First, you will check the route and controller. if you will get everything correct in route So, you will go through Democontroller that you would have earlier made for rendering the blade page.

So, In that, you will check the public function code that I have mentioned on the below image.

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class DemoController extends Controller
{
    public function index()
    {
        return view('home');
    }
    public function about()
    {
        return view('about');
    }
}

After that, you will give the accurate directory path of the blade page then you will get your possible outcomes on local that I have shown on the below image.

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class DemoController extends Controller
{
    public function index()
    {
        return view('home');
    }
    public function about()
    {
        return view('layouts.about');
    }
}

Correcting all, you will get successful outcomes on the local and accurate content of the blade page that you want to show. I have mentioned on below image.

About Blade Page
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x