{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/14093","repository_url":"https://api.github.com/repos/laravel/framework","labels_url":"https://api.github.com/repos/laravel/framework/issues/14093/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/14093/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/14093/events","html_url":"https://github.com/laravel/framework/issues/14093","id":161515014,"number":14093,"title":"@extends inside an if - blade","user":{"login":"rafwell","id":2893078,"avatar_url":"https://avatars.githubusercontent.com/u/2893078?v=3","gravatar_id":"","url":"https://api.github.com/users/rafwell","html_url":"https://github.com/rafwell","followers_url":"https://api.github.com/users/rafwell/followers","following_url":"https://api.github.com/users/rafwell/following{/other_user}","gists_url":"https://api.github.com/users/rafwell/gists{/gist_id}","starred_url":"https://api.github.com/users/rafwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafwell/subscriptions","organizations_url":"https://api.github.com/users/rafwell/orgs","repos_url":"https://api.github.com/users/rafwell/repos","events_url":"https://api.github.com/users/rafwell/events{/privacy}","received_events_url":"https://api.github.com/users/rafwell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-21T19:04:26Z","updated_at":"2016-06-21T19:31:50Z","closed_at":null,"body":"Hello,\r\n\r\nWhen there is a @extends within a @if the compiler translates extends out of the condition.\r\n\r\nSample:\r\n\r\n@if(Request::wantsJson())\t\r\n\t{!!json_encode(['status'=>0, 'msg'=>'lorem ipsum'])!!}\t\r\n@else\r\n\t@extends('layouts.admin')\r\n\t@section('content')\r\n\t\tlorem ipsum inside content...\r\n\t@endsection\r\n@endif\r\n\r\nIn translated view at storage/app/framework/views:\r\n\r\n<?php if(Request::wantsJson()): ?>\t\r\n\t<?php echo json_encode(['status'=>0, 'msg'=>'lorem ipsum']); ?>\t\r\n<?php else: ?>\r\n\t\r\n\t<?php $__env->startSection('content'); ?>\r\n\t\tlorem ipsum inside content...\r\n\t<?php $__env->stopSection(); ?>\r\n<?php endif; ?>\r\n<?php echo $__env->make('layouts.admin', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>\r\n\r\nThis makes my return will be the json the \"if\" and the text \"else\"\r\n\r\nSorry for my english. Thanks!"},"comment":{"url":"https://api.github.com/repos/laravel/framework/issues/comments/227546727","html_url":"https://github.com/laravel/framework/issues/14093#issuecomment-227546727","issue_url":"https://api.github.com/repos/laravel/framework/issues/14093","id":227546727,"user":{"login":"rafwell","id":2893078,"avatar_url":"https://avatars.githubusercontent.com/u/2893078?v=3","gravatar_id":"","url":"https://api.github.com/users/rafwell","html_url":"https://github.com/rafwell","followers_url":"https://api.github.com/users/rafwell/followers","following_url":"https://api.github.com/users/rafwell/following{/other_user}","gists_url":"https://api.github.com/users/rafwell/gists{/gist_id}","starred_url":"https://api.github.com/users/rafwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafwell/subscriptions","organizations_url":"https://api.github.com/users/rafwell/orgs","repos_url":"https://api.github.com/users/rafwell/repos","events_url":"https://api.github.com/users/rafwell/events{/privacy}","received_events_url":"https://api.github.com/users/rafwell/received_events","type":"User","site_admin":false},"created_at":"2016-06-21T19:31:50Z","updated_at":"2016-06-21T19:31:50Z","body":"This is a view for when the user is not allowed to perform an action. The return can be a json (for ajax requests) or html (when a simple get).\r\n\r\nHowever, this problem can occur with any condition, not only in this case.\r\n\r\nThank you!"}}
{"actor":{"display_login":"rafwell"}}