{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/9243","labels_url":"https://api.github.com/repos/laravel/framework/issues/9243/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/9243/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/9243/events","html_url":"https://github.com/laravel/framework/pull/9243","id":87811953,"number":9243,"title":"[5.2] Improve blade @endsection, overwrite by default.","user":{"login":"JesseLeite","id":5187394,"avatar_url":"https://avatars.githubusercontent.com/u/5187394?v=3","gravatar_id":"","url":"https://api.github.com/users/JesseLeite","html_url":"https://github.com/JesseLeite","followers_url":"https://api.github.com/users/JesseLeite/followers","following_url":"https://api.github.com/users/JesseLeite/following{/other_user}","gists_url":"https://api.github.com/users/JesseLeite/gists{/gist_id}","starred_url":"https://api.github.com/users/JesseLeite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JesseLeite/subscriptions","organizations_url":"https://api.github.com/users/JesseLeite/orgs","repos_url":"https://api.github.com/users/JesseLeite/repos","events_url":"https://api.github.com/users/JesseLeite/events{/privacy}","received_events_url":"https://api.github.com/users/JesseLeite/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/laravel/framework/labels/proposal","name":"proposal","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-06-12T18:26:19Z","updated_at":"2015-06-26T01:16:41Z","closed_at":"2015-06-26T01:16:41Z","pull_request":{"url":"https://api.github.com/repos/laravel/framework/pulls/9243","html_url":"https://github.com/laravel/framework/pull/9243","diff_url":"https://github.com/laravel/framework/pull/9243.diff","patch_url":"https://github.com/laravel/framework/pull/9243.patch"},"body":"This addresses my concerns in issue #8970, regarding reusing and nesting `@extend @yield @section` directives within partials.\r\n\r\nTL;DR...\r\n```php\r\n@endsection // overwrite=false, does not allow multiple instances of section name.\r\n```\r\n```php\r\n@stop       // overwrite=false, does not allow multiple instances of section name.\r\n```\r\n```php\r\n@overwrite  // overwrite=true, allows multiple instances by overwriting at compile time.\r\n```\r\n\r\nI think most users would benefit from being able to use reuse and nest `@extend @yield @section` directives throughout an app, even if sections reuse common names like 'title' or 'body' in their partials.\r\n\r\nWe already have this functionality if we force the compiler to overwrite the section in memory by using `@overwrite` instead of `@endsection`.  However, default `@endsection` functionality disallows this, because it duplicates `@stop` functionality.  I think the issue here is in the naming of `@endsection`, and confusion around it's default behaviour.  Sure, using `@overwrite` solves #8970 functionally, but the terminology of 'overwrite' is misleading for this use case; I'm not trying to 'overwrite' the last title section, I'm trying to define a new title section in a totally separate partial.  I'm not doing the overwriting, the compiler is just overwriting the last instance at compile time.\r\n\r\nUnfortunately, this IS a breaking change, even if it doesn't affect many users.  If merged, any users who need original functionality can `@stop` their sections.  However, I think allowing `@extend @yield @section` with `@endsection` everywhere throughout an app is much more intuitive, so I'm proposing this PR for 5.2.\r\n\r\nThank you for considering this."},"comment":{"url":"https://api.github.com/repos/laravel/framework/issues/comments/115451071","html_url":"https://github.com/laravel/framework/pull/9243#issuecomment-115451071","issue_url":"https://api.github.com/repos/laravel/framework/issues/9243","id":115451071,"user":{"login":"taylorotwell","id":463230,"avatar_url":"https://avatars.githubusercontent.com/u/463230?v=3","gravatar_id":"","url":"https://api.github.com/users/taylorotwell","html_url":"https://github.com/taylorotwell","followers_url":"https://api.github.com/users/taylorotwell/followers","following_url":"https://api.github.com/users/taylorotwell/following{/other_user}","gists_url":"https://api.github.com/users/taylorotwell/gists{/gist_id}","starred_url":"https://api.github.com/users/taylorotwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taylorotwell/subscriptions","organizations_url":"https://api.github.com/users/taylorotwell/orgs","repos_url":"https://api.github.com/users/taylorotwell/repos","events_url":"https://api.github.com/users/taylorotwell/events{/privacy}","received_events_url":"https://api.github.com/users/taylorotwell/received_events","type":"User","site_admin":false},"created_at":"2015-06-26T01:16:41Z","updated_at":"2015-06-26T01:16:41Z","body":"Going to hold off on this."}}