{"id":7449,"date":"2021-08-19T00:30:12","date_gmt":"2021-08-19T00:30:12","guid":{"rendered":"https:\/\/www.scmgalaxy.com\/tutorials\/?p=7449"},"modified":"2021-08-19T00:30:15","modified_gmt":"2021-08-19T00:30:15","slug":"complete-reference-of-view-in-laravel","status":"publish","type":"post","link":"https:\/\/www.scmgalaxy.com\/tutorials\/complete-reference-of-view-in-laravel\/","title":{"rendered":"Complete Reference of view in Laravel"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">What is View?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Views contain the HTML served by your application and separate your application logic from your presentation logic. Views are stored in the<strong> resources\/views<\/strong> directory.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Creating View<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>resources\/views\/aboutme.blade.php<\/strong><\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/amardeep-devopsschool\/1c8f6e644e831ff34f0245a3216ffc60.js\"><\/script>\n\n\n\n<h2 class=\"wp-block-heading\">Create Route for View<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Syntax:-<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nRoute::get(\u2018uri\u2019, function(){return view(\u2018view_name\u2019)});\n\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Example:-<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nRoute::get(\u2018about&#039;, function () {\n    return view(\u2018aboutme&#039;);\n});\n\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">If your route only needs to return a view, you may use the Route::view method.<br><strong>Syntax:-<\/strong> Route::view(\u2018uri\u2019, \u2018view_name\u2019);<br><strong>Example:-<\/strong> Route::view(\u2018about\u2019, \u2018aboutme\u2019)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is View? Views contain the HTML served by your application and separate your application logic from your presentation logic. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7449","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Complete Reference of view in Laravel - scmGalaxy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.scmgalaxy.com\/tutorials\/complete-reference-of-view-in-laravel\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Complete Reference of view in Laravel - scmGalaxy\" \/>\n<meta property=\"og:description\" content=\"What is View? Views contain the HTML served by your application and separate your application logic from your presentation logic. [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/complete-reference-of-view-in-laravel\/\" \/>\n<meta property=\"og:site_name\" content=\"scmGalaxy\" \/>\n<meta property=\"article:published_time\" content=\"2021-08-19T00:30:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-19T00:30:15+00:00\" \/>\n<meta name=\"author\" content=\"Amardeep Dubey\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Amardeep Dubey\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/complete-reference-of-view-in-laravel\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/complete-reference-of-view-in-laravel\\\/\"},\"author\":{\"name\":\"Amardeep Dubey\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/097cf9059af187b39521d8641650ddda\"},\"headline\":\"Complete Reference of view in Laravel\",\"datePublished\":\"2021-08-19T00:30:12+00:00\",\"dateModified\":\"2021-08-19T00:30:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/complete-reference-of-view-in-laravel\\\/\"},\"wordCount\":78,\"commentCount\":0,\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/complete-reference-of-view-in-laravel\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/complete-reference-of-view-in-laravel\\\/\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/complete-reference-of-view-in-laravel\\\/\",\"name\":\"Complete Reference of view in Laravel - scmGalaxy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\"},\"datePublished\":\"2021-08-19T00:30:12+00:00\",\"dateModified\":\"2021-08-19T00:30:15+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/097cf9059af187b39521d8641650ddda\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/complete-reference-of-view-in-laravel\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/complete-reference-of-view-in-laravel\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/complete-reference-of-view-in-laravel\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Complete Reference of view in Laravel\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\",\"name\":\"scmGalaxy\",\"description\":\"A Platform for Software Engineers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/097cf9059af187b39521d8641650ddda\",\"name\":\"Amardeep Dubey\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/79b318f73f1ee84d7678ea32f5af8984012529c7a67c2deb7e3030dc8c6114ba?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/79b318f73f1ee84d7678ea32f5af8984012529c7a67c2deb7e3030dc8c6114ba?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/79b318f73f1ee84d7678ea32f5af8984012529c7a67c2deb7e3030dc8c6114ba?s=96&d=mm&r=g\",\"caption\":\"Amardeep Dubey\"},\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/author\\\/amardeep\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Complete Reference of view in Laravel - scmGalaxy","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:\/\/www.scmgalaxy.com\/tutorials\/complete-reference-of-view-in-laravel\/","og_locale":"en_US","og_type":"article","og_title":"Complete Reference of view in Laravel - scmGalaxy","og_description":"What is View? Views contain the HTML served by your application and separate your application logic from your presentation logic. [&hellip;]","og_url":"https:\/\/www.scmgalaxy.com\/tutorials\/complete-reference-of-view-in-laravel\/","og_site_name":"scmGalaxy","article_published_time":"2021-08-19T00:30:12+00:00","article_modified_time":"2021-08-19T00:30:15+00:00","author":"Amardeep Dubey","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Amardeep Dubey","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/complete-reference-of-view-in-laravel\/#article","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/complete-reference-of-view-in-laravel\/"},"author":{"name":"Amardeep Dubey","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/097cf9059af187b39521d8641650ddda"},"headline":"Complete Reference of view in Laravel","datePublished":"2021-08-19T00:30:12+00:00","dateModified":"2021-08-19T00:30:15+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/complete-reference-of-view-in-laravel\/"},"wordCount":78,"commentCount":0,"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.scmgalaxy.com\/tutorials\/complete-reference-of-view-in-laravel\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/complete-reference-of-view-in-laravel\/","url":"https:\/\/www.scmgalaxy.com\/tutorials\/complete-reference-of-view-in-laravel\/","name":"Complete Reference of view in Laravel - scmGalaxy","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website"},"datePublished":"2021-08-19T00:30:12+00:00","dateModified":"2021-08-19T00:30:15+00:00","author":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/097cf9059af187b39521d8641650ddda"},"breadcrumb":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/complete-reference-of-view-in-laravel\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scmgalaxy.com\/tutorials\/complete-reference-of-view-in-laravel\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/complete-reference-of-view-in-laravel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scmgalaxy.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Complete Reference of view in Laravel"}]},{"@type":"WebSite","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website","url":"https:\/\/www.scmgalaxy.com\/tutorials\/","name":"scmGalaxy","description":"A Platform for Software Engineers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.scmgalaxy.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/097cf9059af187b39521d8641650ddda","name":"Amardeep Dubey","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/79b318f73f1ee84d7678ea32f5af8984012529c7a67c2deb7e3030dc8c6114ba?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/79b318f73f1ee84d7678ea32f5af8984012529c7a67c2deb7e3030dc8c6114ba?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/79b318f73f1ee84d7678ea32f5af8984012529c7a67c2deb7e3030dc8c6114ba?s=96&d=mm&r=g","caption":"Amardeep Dubey"},"url":"https:\/\/www.scmgalaxy.com\/tutorials\/author\/amardeep\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/7449","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/comments?post=7449"}],"version-history":[{"count":1,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/7449\/revisions"}],"predecessor-version":[{"id":8090,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/7449\/revisions\/8090"}],"wp:attachment":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media?parent=7449"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/categories?post=7449"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/tags?post=7449"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}