Cannot end a section without first starting one

Updated at 16-Aug-2021, By samar

Cannot end a section without first starting one

We’ll attempt to use programming in this lesson to solve the "Cannot end a section without first starting one" puzzle.

You have to start the section in blade file before ending it. You got the error Cannot end a section without first starting one when you use @endsection without starting it with @section('content').
  • Start @section('content') in your blade file

    @section('content')
    //Your content
    @endsection
    
    

    You have to start the section with @section('content') and end the section block with @endsection in your blade template file.

Back to code snippet queries related laravel