Laravel Blade: @endsection vs @stop

后端 未结 3 503
天涯浪人
天涯浪人 2021-01-01 09:29

In Laravel Blade, we can basically do this:

@section(\'mysection\')

@endsection


@section(\'mysection\')

@stop

What is the difference be

3条回答
  •  一向
    一向 (楼主)
    2021-01-01 10:06

    The @endsection was used in Laravel 3 and it was deprecated in Laravel 4

    In the Laravel 4 to end a section you have to use @stop

    You can refer the Changelog here http://wiki.laravel.io/Changelog_%28Laravel_4%29#Blade_Templating

提交回复
热议问题