【发布时间】:2017-10-09 07:28:41
【问题描述】:
我已经安装了 Laravel Blade Highlighter..
@yield @section @endsection 不起作用,只是一个纯白色文本..
我的视图工作正常..我可以浏览它们没问题..
这是我的代码:
web.php:
Route::get('/', 'PagesController@index');
Route::get('/about', 'PagesController@about');
Route::get('/services', 'PagesController@services');
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
【问题讨论】:
-
而且 app.blade.php 在 layouts 目录中,对吧?
-
你需要把
index.php改成index.blade.php然后你需要把storage权限改成php可以写在那里。 -
是的,谢谢!我应该关闭 sublime text 上的所有选项卡,这样我才能看到更改。
标签: laravel sublimetext3 blade highlight yield