0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Cannot end a section without first starting one. [Laravel]

Last updated at Posted at 2020-07-08

Cannot end a section without first starting one.

bladeテンプレートの構文エラーと発生する原因について

発生する原因

シンタックスエラーの可能性:セクションが正しく囲われていないケース

master.blade.php
@section
 記述
@endsection

タイポ:共通レイアウトの呼び出し名が間違っているケース

master.blade.php
// 呼び出した共通レイアウト名が正しいか確認する
@extends('layouts.base') 

タイポ:構文が間違っているケース

master.blade.php
// sectionがsecitonになっている
@seciton('main')
  <p>{{ $msg }}</p>
@endsection
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?