2017-10-09 1 views
0

그냥 일반 흰색 텍스트를 작동하지에 ('내용') ..@yield laravel가 이미 Laravel 블레이드 형광펜을 설치 한

@yield의 @section의 @endsection을 작동하지 않는, 그냥 평범한 흰색 텍스트 ..

web.php :

Route::get('/', '[email protected]'); 
Route::get('/about', '[email protected]'); 
Route::get('/services', '[email protected]'); 

내보기는 여기

내 코드입니다 .. 제가 브라우저를 좋아 할 수 있습니다 .. 제대로 작동

pagesController.php

namespace App\Http\Controllers; 

use Illuminate\Http\Request; 

class PagesController extends Controller 
{ 
    public function index(){ 
     return view('pages.index');; 
    } 

    public function about(){ 
     return view('pages.about'); 
    } 

    public function services(){ 
     return view('pages.services'); 
    } 

} 

app.blade.php

<h1>This is the laravel</h1> 
@yield('content') 

의 index.php :

@extends('layouts.app') 

@section('content') 
    <h1>Welcome to Laravel</h1> 
    <p>this is a content</p> 
@endsection 
+0

그리고 app.blade.php는 레이아웃 디렉토리에 있습니다. 맞습니까? – Amarnasan

+1

'index.php'를'index.blade.php'로 바꿔야합니다. 그러면'storage' 권한을 PHP로 쓸 수있게 변경해야합니다. –

+0

네, 고마워요! 그리고 난 그 변화를 볼 수 있도록 장엄한 텍스트의 모든 탭을 닫아야합니다. –

답변

0

대답은 내 숭고한 텍스트에 열려있는 모든 탭을 닫아야입니다 ..

index.php, about.php 및 services.php는 about.blade 인 index.blade.php 여야합니다. php and services.blade.php