{"id":1514,"date":"2017-04-07T13:10:07","date_gmt":"2017-04-07T11:10:07","guid":{"rendered":"https:\/\/vielhuber.de\/?p=1514"},"modified":"2017-04-24T21:15:27","modified_gmt":"2017-04-24T19:15:27","slug":"laravel-blade-template-debugging","status":"publish","type":"post","link":"https:\/\/vielhuber.de\/blog\/laravel-blade-template-debugging\/","title":{"rendered":"Laravel: Blade Template Debugging"},"content":{"rendered":"<p>Beim Debuggen von Blade-Templates in Laravel 5.* erh\u00e4lt man oft nichtssagende, auf gecachte Views verweisende Fehlermeldungen. Dabei war fr\u00fcher alle besser:\u00a0Die Debugging-Ansicht in Version 4 enthielt dabei hilfreichere Funktionen und war auch optisch sch\u00f6ner aufbereitet. Mit ein paar Zeilen Code holt man sich mit Hilfe von <a href=\"https:\/\/github.com\/filp\/whoops\" target=\"_blank\" rel=\"noopener noreferrer\">whoops<\/a>\u00a0(\u201ePHP errors for cool kids\u201c) diese Funktionalit\u00e4t wieder zur\u00fcck.<\/p>\n<p><!--more--><\/p>\n<p>Eine beispielhafte Fehleransicht sieht bei Laravel 5.4 zun\u00e4chst so aus:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/vielhuber.de\/wp-content\/uploads\/432.png\" alt=\"Laravel: Blade Template Debugging\" \/><\/p>\n<p>Zun\u00e4chst bindet man in den Dev-Block der composer.json das Paket \"filp\/whoops\" ein:<\/p>\n<p class=\"githubgist\" data-gist-file=\"bash.sh\">b29e71797fcd218306e15ef463ee9cba<\/p>\n<p>Anschlie\u00dfend modifiziert man die Render-Methode, die daf\u00fcr zust\u00e4ndig ist, die Exception an den Browser auszugeben:<\/p>\n<p class=\"githubgist\" data-gist-file=\"Handler.php\">b29e71797fcd218306e15ef463ee9cba<\/p>\n<p>Nun erh\u00e4lt man zum Fehler die volle Codevorschau sowie weitere nette Features wie aktuelle Umgebungsvariablen:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/vielhuber.de\/wp-content\/uploads\/283.png\" alt=\"Laravel: Blade Template Debugging\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Beim Debuggen von Blade-Templates in Laravel 5.* erh\u00e4lt man oft nichtssagende, auf gecachte Views verweisende Fehlermeldungen. Dabei war fr\u00fcher alle besser:\u00a0Die Debugging-Ansicht in Version 4 enthielt dabei hilfreichere Funktionen und war auch optisch sch\u00f6ner aufbereitet. Mit ein paar Zeilen Code holt man sich mit Hilfe von whoops\u00a0(\u201ePHP errors for cool kids\u201c) diese Funktionalit\u00e4t wieder zur\u00fcck.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"gtbabel_prevent_lngs":"","gtbabel_alt_lng":"","footnotes":""},"categories":[1],"tags":[],"class_list":{"0":"post-1514","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-blog"},"acf":[],"yoast_head":"<title>Laravel: Blade Template Debugging &#060; Vielhuber David<\/title>\n<meta name=\"description\" content=\"Beim Debuggen von Blade-Templates in Laravel 5.* erh\u00e4lt man oft nichtssagende, auf gecachte Views verweisende Fehlermeldungen. Dabei war fr\u00fcher alle\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/vielhuber.de\/blog\/laravel-blade-template-debugging\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Laravel: Blade Template Debugging &#060; Vielhuber David\" \/>\n<meta property=\"og:description\" content=\"Beim Debuggen von Blade-Templates in Laravel 5.* erh\u00e4lt man oft nichtssagende, auf gecachte Views verweisende Fehlermeldungen. Dabei war fr\u00fcher alle\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vielhuber.de\/blog\/laravel-blade-template-debugging\/\" \/>\n<meta property=\"og:site_name\" content=\"Vielhuber David\" \/>\n<meta property=\"article:published_time\" content=\"2017-04-07T11:10:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-04-24T19:15:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/vielhuber.de\/wp-content\/uploads\/432.png\" \/>\n<meta name=\"author\" content=\"David\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vielhuber\" \/>\n<meta name=\"twitter:site\" content=\"@vielhuber\" \/>\n<meta name=\"twitter:label1\" content=\"Verfasst von\" \/>\n\t<meta name=\"twitter:data1\" content=\"David\" \/>\n\t<meta name=\"twitter:label2\" content=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data2\" content=\"1\u00a0Minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/vielhuber.de\\\/blog\\\/laravel-blade-template-debugging\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/vielhuber.de\\\/blog\\\/laravel-blade-template-debugging\\\/\"},\"author\":{\"name\":\"David\",\"@id\":\"https:\\\/\\\/vielhuber.de\\\/#\\\/schema\\\/person\\\/64d4ff14713d413ea4d9b210d0c2c6ef\"},\"headline\":\"Laravel: Blade Template Debugging\",\"datePublished\":\"2017-04-07T11:10:07+00:00\",\"dateModified\":\"2017-04-24T19:15:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/vielhuber.de\\\/blog\\\/laravel-blade-template-debugging\\\/\"},\"wordCount\":137,\"publisher\":{\"@id\":\"https:\\\/\\\/vielhuber.de\\\/#\\\/schema\\\/person\\\/64d4ff14713d413ea4d9b210d0c2c6ef\"},\"image\":{\"@id\":\"https:\\\/\\\/vielhuber.de\\\/blog\\\/laravel-blade-template-debugging\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/vielhuber.de\\\/wp-content\\\/uploads\\\/432.png\",\"articleSection\":[\"Blog\"],\"inLanguage\":\"de\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/vielhuber.de\\\/blog\\\/laravel-blade-template-debugging\\\/\",\"url\":\"https:\\\/\\\/vielhuber.de\\\/blog\\\/laravel-blade-template-debugging\\\/\",\"name\":\"Laravel: Blade Template Debugging &#060; Vielhuber David\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/vielhuber.de\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/vielhuber.de\\\/blog\\\/laravel-blade-template-debugging\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/vielhuber.de\\\/blog\\\/laravel-blade-template-debugging\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/vielhuber.de\\\/wp-content\\\/uploads\\\/432.png\",\"datePublished\":\"2017-04-07T11:10:07+00:00\",\"dateModified\":\"2017-04-24T19:15:27+00:00\",\"description\":\"Beim Debuggen von Blade-Templates in Laravel 5.* erh\u00e4lt man oft nichtssagende, auf gecachte Views verweisende Fehlermeldungen. Dabei war fr\u00fcher alle\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/vielhuber.de\\\/blog\\\/laravel-blade-template-debugging\\\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/vielhuber.de\\\/blog\\\/laravel-blade-template-debugging\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\\\/\\\/vielhuber.de\\\/blog\\\/laravel-blade-template-debugging\\\/#primaryimage\",\"url\":\"https:\\\/\\\/vielhuber.de\\\/wp-content\\\/uploads\\\/432.png\",\"contentUrl\":\"https:\\\/\\\/vielhuber.de\\\/wp-content\\\/uploads\\\/432.png\",\"width\":991,\"height\":265},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/vielhuber.de\\\/blog\\\/laravel-blade-template-debugging\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/vielhuber.de\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Laravel: Blade Template Debugging\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/vielhuber.de\\\/#website\",\"url\":\"https:\\\/\\\/vielhuber.de\\\/\",\"name\":\"Vielhuber David\",\"description\":\"Full-Stack Developer\",\"publisher\":{\"@id\":\"https:\\\/\\\/vielhuber.de\\\/#\\\/schema\\\/person\\\/64d4ff14713d413ea4d9b210d0c2c6ef\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/vielhuber.de\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"de\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/vielhuber.de\\\/#\\\/schema\\\/person\\\/64d4ff14713d413ea4d9b210d0c2c6ef\",\"name\":\"David\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\\\/\\\/vielhuber.de\\\/wp-content\\\/uploads\\\/about.jpg\",\"url\":\"https:\\\/\\\/vielhuber.de\\\/wp-content\\\/uploads\\\/about.jpg\",\"contentUrl\":\"https:\\\/\\\/vielhuber.de\\\/wp-content\\\/uploads\\\/about.jpg\",\"width\":700,\"height\":552,\"caption\":\"David\"},\"logo\":{\"@id\":\"https:\\\/\\\/vielhuber.de\\\/wp-content\\\/uploads\\\/about.jpg\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/vielhuber\"]}]}<\/script>","yoast_head_json":{"title":"Laravel: Blade Template Debugging &#060; Vielhuber David","description":"Beim Debuggen von Blade-Templates in Laravel 5.* erh\u00e4lt man oft nichtssagende, auf gecachte Views verweisende Fehlermeldungen. Dabei war fr\u00fcher alle","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/vielhuber.de\/blog\/laravel-blade-template-debugging\/","og_locale":"de_DE","og_type":"article","og_title":"Laravel: Blade Template Debugging &#060; Vielhuber David","og_description":"Beim Debuggen von Blade-Templates in Laravel 5.* erh\u00e4lt man oft nichtssagende, auf gecachte Views verweisende Fehlermeldungen. Dabei war fr\u00fcher alle","og_url":"https:\/\/vielhuber.de\/blog\/laravel-blade-template-debugging\/","og_site_name":"Vielhuber David","article_published_time":"2017-04-07T11:10:07+00:00","article_modified_time":"2017-04-24T19:15:27+00:00","og_image":[{"url":"https:\/\/vielhuber.de\/wp-content\/uploads\/432.png","type":"","width":"","height":""}],"author":"David","twitter_card":"summary_large_image","twitter_creator":"@vielhuber","twitter_site":"@vielhuber","twitter_misc":{"Verfasst von":"David","Gesch\u00e4tzte Lesezeit":"1\u00a0Minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/vielhuber.de\/blog\/laravel-blade-template-debugging\/#article","isPartOf":{"@id":"https:\/\/vielhuber.de\/blog\/laravel-blade-template-debugging\/"},"author":{"name":"David","@id":"https:\/\/vielhuber.de\/#\/schema\/person\/64d4ff14713d413ea4d9b210d0c2c6ef"},"headline":"Laravel: Blade Template Debugging","datePublished":"2017-04-07T11:10:07+00:00","dateModified":"2017-04-24T19:15:27+00:00","mainEntityOfPage":{"@id":"https:\/\/vielhuber.de\/blog\/laravel-blade-template-debugging\/"},"wordCount":137,"publisher":{"@id":"https:\/\/vielhuber.de\/#\/schema\/person\/64d4ff14713d413ea4d9b210d0c2c6ef"},"image":{"@id":"https:\/\/vielhuber.de\/blog\/laravel-blade-template-debugging\/#primaryimage"},"thumbnailUrl":"https:\/\/vielhuber.de\/wp-content\/uploads\/432.png","articleSection":["Blog"],"inLanguage":"de"},{"@type":"WebPage","@id":"https:\/\/vielhuber.de\/blog\/laravel-blade-template-debugging\/","url":"https:\/\/vielhuber.de\/blog\/laravel-blade-template-debugging\/","name":"Laravel: Blade Template Debugging &#060; Vielhuber David","isPartOf":{"@id":"https:\/\/vielhuber.de\/#website"},"primaryImageOfPage":{"@id":"https:\/\/vielhuber.de\/blog\/laravel-blade-template-debugging\/#primaryimage"},"image":{"@id":"https:\/\/vielhuber.de\/blog\/laravel-blade-template-debugging\/#primaryimage"},"thumbnailUrl":"https:\/\/vielhuber.de\/wp-content\/uploads\/432.png","datePublished":"2017-04-07T11:10:07+00:00","dateModified":"2017-04-24T19:15:27+00:00","description":"Beim Debuggen von Blade-Templates in Laravel 5.* erh\u00e4lt man oft nichtssagende, auf gecachte Views verweisende Fehlermeldungen. Dabei war fr\u00fcher alle","breadcrumb":{"@id":"https:\/\/vielhuber.de\/blog\/laravel-blade-template-debugging\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vielhuber.de\/blog\/laravel-blade-template-debugging\/"]}]},{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/vielhuber.de\/blog\/laravel-blade-template-debugging\/#primaryimage","url":"https:\/\/vielhuber.de\/wp-content\/uploads\/432.png","contentUrl":"https:\/\/vielhuber.de\/wp-content\/uploads\/432.png","width":991,"height":265},{"@type":"BreadcrumbList","@id":"https:\/\/vielhuber.de\/blog\/laravel-blade-template-debugging\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/vielhuber.de\/"},{"@type":"ListItem","position":2,"name":"Laravel: Blade Template Debugging"}]},{"@type":"WebSite","@id":"https:\/\/vielhuber.de\/#website","url":"https:\/\/vielhuber.de\/","name":"Vielhuber David","description":"Full-Stack Developer","publisher":{"@id":"https:\/\/vielhuber.de\/#\/schema\/person\/64d4ff14713d413ea4d9b210d0c2c6ef"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vielhuber.de\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"de"},{"@type":["Person","Organization"],"@id":"https:\/\/vielhuber.de\/#\/schema\/person\/64d4ff14713d413ea4d9b210d0c2c6ef","name":"David","image":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/vielhuber.de\/wp-content\/uploads\/about.jpg","url":"https:\/\/vielhuber.de\/wp-content\/uploads\/about.jpg","contentUrl":"https:\/\/vielhuber.de\/wp-content\/uploads\/about.jpg","width":700,"height":552,"caption":"David"},"logo":{"@id":"https:\/\/vielhuber.de\/wp-content\/uploads\/about.jpg"},"sameAs":["https:\/\/x.com\/vielhuber"]}]}},"_links":{"self":[{"href":"https:\/\/vielhuber.de\/sq\/wp-json\/wp\/v2\/posts\/1514","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vielhuber.de\/sq\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vielhuber.de\/sq\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vielhuber.de\/sq\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vielhuber.de\/sq\/wp-json\/wp\/v2\/comments?post=1514"}],"version-history":[{"count":6,"href":"https:\/\/vielhuber.de\/sq\/wp-json\/wp\/v2\/posts\/1514\/revisions"}],"predecessor-version":[{"id":1571,"href":"https:\/\/vielhuber.de\/sq\/wp-json\/wp\/v2\/posts\/1514\/revisions\/1571"}],"wp:attachment":[{"href":"https:\/\/vielhuber.de\/sq\/wp-json\/wp\/v2\/media?parent=1514"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vielhuber.de\/sq\/wp-json\/wp\/v2\/categories?post=1514"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vielhuber.de\/sq\/wp-json\/wp\/v2\/tags?post=1514"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}