Laravel Blade: @endsection vs @stop

user1995781 picture user1995781 · Jan 18, 2014 · Viewed 17.2k times · Source

In Laravel Blade, we can basically do this:

@section('mysection')

@endsection


@section('mysection')

@stop

What is the difference between @stop and @endsection?

Answer

Achintha Samindika picture Achintha Samindika · Jan 18, 2014

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