{"action":"created","issue":{"url":"https://api.github.com/repos/mikaelmattsson/blade/issues/20","labels_url":"https://api.github.com/repos/mikaelmattsson/blade/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/mikaelmattsson/blade/issues/20/comments","events_url":"https://api.github.com/repos/mikaelmattsson/blade/issues/20/events","html_url":"https://github.com/mikaelmattsson/blade/issues/20","id":58361561,"number":20,"title":"How to use it in a Widget","user":{"login":"prodes","id":3706355,"avatar_url":"https://avatars.githubusercontent.com/u/3706355?v=3","gravatar_id":"","url":"https://api.github.com/users/prodes","html_url":"https://github.com/prodes","followers_url":"https://api.github.com/users/prodes/followers","following_url":"https://api.github.com/users/prodes/following{/other_user}","gists_url":"https://api.github.com/users/prodes/gists{/gist_id}","starred_url":"https://api.github.com/users/prodes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prodes/subscriptions","organizations_url":"https://api.github.com/users/prodes/orgs","repos_url":"https://api.github.com/users/prodes/repos","events_url":"https://api.github.com/users/prodes/events{/privacy}","received_events_url":"https://api.github.com/users/prodes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-20T14:42:16Z","updated_at":"2015-02-20T15:26:52Z","closed_at":null,"body":"Hi,\r\n\r\nFirst of all: Hallelujah!\r\nBlade is such a great engine and we love to work with it!\r\n\r\nBeing able to use Blade in Wordpress is the best! \r\n\r\nI do have a about using it in a widget.\r\nIs there someway to include the engine in a widget? \r\n\r\nMy {{ }} are not being replaced right now!"},"comment":{"url":"https://api.github.com/repos/mikaelmattsson/blade/issues/comments/75255768","html_url":"https://github.com/mikaelmattsson/blade/issues/20#issuecomment-75255768","issue_url":"https://api.github.com/repos/mikaelmattsson/blade/issues/20","id":75255768,"user":{"login":"mikaelmattsson","id":2428696,"avatar_url":"https://avatars.githubusercontent.com/u/2428696?v=3","gravatar_id":"","url":"https://api.github.com/users/mikaelmattsson","html_url":"https://github.com/mikaelmattsson","followers_url":"https://api.github.com/users/mikaelmattsson/followers","following_url":"https://api.github.com/users/mikaelmattsson/following{/other_user}","gists_url":"https://api.github.com/users/mikaelmattsson/gists{/gist_id}","starred_url":"https://api.github.com/users/mikaelmattsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikaelmattsson/subscriptions","organizations_url":"https://api.github.com/users/mikaelmattsson/orgs","repos_url":"https://api.github.com/users/mikaelmattsson/repos","events_url":"https://api.github.com/users/mikaelmattsson/events{/privacy}","received_events_url":"https://api.github.com/users/mikaelmattsson/received_events","type":"User","site_admin":false},"created_at":"2015-02-20T15:26:52Z","updated_at":"2015-02-20T15:26:52Z","body":"I haven't tested it but it might be possible to do something like this:\r\n\r\n\r\n    $view = Laravel\\View::make( 'path: ' . $template, array() );\r\n    $pathToCompiled = Laravel\\Blade::compiled( $view->path );\r\n    if ( ! file_exists( $pathToCompiled ) or Laravel\\Blade::expired( $view->view, $view->path ) ) {\r\n        file_put_contents( $pathToCompiled, \"<?php // $template ?>\\n\".Laravel\\Blade::compile( $view ) );\r\n    }\r\n     require $pathToCompiled;\r\n\r\nIt is kind of ugly.\r\nIf you would like, you could experiment with it and submit a pull request."}}