I want to include the header and footer file in my index.blade.php. I put all my header content in header.blade.php file and footer content in footer.blade.php file. Following is my Controller:
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class GeneralController extends Controller
{
public function header()
{
return view('header');
}
public function footer()
{
return view('footer');
}
public function index()
{
$this->header();
return view('index');
$this->footer();
}
}
I am calling the header function before loading the main content. and footer file after loading the main content. I was doing this in Codeigniter and it worked fine there. but it is not working in Laravel. Please Help.
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2qCcdfD
via IFTTT
Aucun commentaire:
Enregistrer un commentaire