Laravel version 5.2.36. Homestead do not use.

File test.blade.php

 @extends('app') @section('asd') asd @stop 

File app.blade.php

 @yield('asd') 

Controller

 public function index() { return view('test.test') } 

When viewing the page I expect to see:

asd

And I see the output of the template code:

@extends ('app')
@section ('asd')
asd
@stop

Why it happens?

  • Show what exactly is displayed and what you expect to see - VenZell
  • @Extends ('app') is displayed. I expect to see the template - asd
  • The code itself is displayed as plain text, do I understand correctly? - VenZell
  • Right. Output as plain text - asd
  • 2
    In the index function ";" not worth the end. And try in the console php artisan view: clear - Alex_01

1 answer 1

Controller example:

 namespace App\Http\Controllers; use Illuminate\Http\Request; public function selectViewItem() { return view('test.index'); } 

An example of a call to route:

 Route::get('/test','TwitterController@selectViewItem'); 

This is a common problem. Either you forgot to call to the route or you demolished the template engine itself.