2016-05-09 23 views
0

Ich verstehe nicht, warum der Inhalt nicht sichtbar ist kein Browser.PHP Laravel 5.1

index.blade.php

<!DOCTYPE html> 
<html> 
    <head> 
    <title>Teste</title> 
    </head> 
    <body> 

    @yield('content') 

    </body> 
</html> 

conteudo.blade.php

@extends('index') 

@section('content') 
    <p>This is my body content.</p> 
@endsection 

routes.php

Route::get('index', function() { 
    return view('layouts/index'); 

}); 

Route::get('blade', function() { 
    return view('layouts/conteudo'); 

}); 
+1

Warte, du hast also einen Layout-Ordner, der sowohl deine index.blade.php-Datei als auch deine conteudo.blade.php-Datei enthält? Solltest du '@extens ('layouts.index')' in @ condeudo.blade.php noch nicht haben? –

+0

Ja, ich habe zwei Dateien im selben Ordner –

Antwort

0

Probieren Sie dies aus:

bitte Ihre conteudo.blade.php ändern Code

@extends('index') 

@section('content') 
    <p>This is my body content.</p> 
@endsection 

Um
@extends('layouts.index') 

@section('content') 
    <p>This is my body content.</p> 
@endsection 

Hoffnung, dies hilft Ihnen.