{"id":18632,"date":"2020-09-10T18:15:27","date_gmt":"2020-09-10T18:15:27","guid":{"rendered":"http:\/\/www.devopsschool.com\/blog\/?p=18632"},"modified":"2021-10-29T06:30:10","modified_gmt":"2021-10-29T06:30:10","slug":"basic-things-to-find-error-in-laravel","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/basic-things-to-find-error-in-laravel\/","title":{"rendered":"Basic Things To Find  Error In Laravel"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"157\" height=\"54\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/18-1.png\" alt=\"\" class=\"wp-image-18650\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"436\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/19-1-1024x436.png\" alt=\"\" class=\"wp-image-18651\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/19-1-1024x436.png 1024w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/19-1-300x128.png 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/19-1-768x327.png 768w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/19-1.png 1346w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><em><strong>To be master in finding error and build logic to make query, certain things should understand properly<\/strong><\/em><\/p>\n\n\n\n<p class=\"has-text-align-left\"><br>(i) check wheather your routing working properly or controller working properly<br>(ii) connection between blade file,routing and controller matched properly<br>(iii) your query syntax ,logic working properly<br>(iv) to make customized view with clear logic and client requirement can be compiled with query<br>(v) while u running your view or blade file inspect the page in google            chrome browser<br>    (a) check network all script, css, bootstrap link working prperly<br>     (b) if 404,500 error appear then your there is some bugs in ur code<br>       200 shows ok status<br>    (c) click console,source and debug to check syntax and logical error<br>(vi) run php artisan c:cache, php artisan route:cache, php artisan view :cache after manipulating,altering your code<\/p>\n\n\n\n<p>(vii)  if any error appear search in google,stackoverfolw.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>in controller return simple variable,like return &#8220;welcome&#8221;;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"669\" height=\"124\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/1-2.png\" alt=\"\" class=\"wp-image-18633\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/1-2.png 669w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/1-2-300x56.png 300w\" sizes=\"auto, (max-width: 669px) 100vw, 669px\" \/><\/figure>\n\n\n\n<p>if welcome msg appears after clicking rvsp then first(i) and second point (ii) satisfied<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"212\" height=\"488\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/2-4.png\" alt=\"\" class=\"wp-image-18634\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/2-4.png 212w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/2-4-130x300.png 130w\" sizes=\"auto, (max-width: 212px) 100vw, 212px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"716\" height=\"123\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/3-4.png\" alt=\"\" class=\"wp-image-18635\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/3-4.png 716w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/3-4-300x52.png 300w\" sizes=\"auto, (max-width: 716px) 100vw, 716px\" \/><\/figure>\n\n\n\n<p>in controller return query variable or compact variable to check third point(iii) and (iv) like return $res;<\/p>\n\n\n\n<p>(iii) your query syntax ,logic working properly<br>(iv) to make customized view with clear logic and client requirement can be compiled with query<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"627\" height=\"153\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/5-7.png\" alt=\"\" class=\"wp-image-18636\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/5-7.png 627w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/5-7-300x73.png 300w\" sizes=\"auto, (max-width: 627px) 100vw, 627px\" \/><figcaption><strong>figure (i)<\/strong><\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"442\" height=\"180\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/4-7.png\" alt=\"\" class=\"wp-image-18637\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/4-7.png 442w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/4-7-300x122.png 300w\" sizes=\"auto, (max-width: 442px) 100vw, 442px\" \/><figcaption><strong>figure(ii)<\/strong><\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"590\" height=\"237\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/6-4.png\" alt=\"\" class=\"wp-image-18638\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/6-4.png 590w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/6-4-300x121.png 300w\" sizes=\"auto, (max-width: 590px) 100vw, 590px\" \/><figcaption>figure(iii)<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1007\" height=\"196\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/7-4.png\" alt=\"\" class=\"wp-image-18639\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/7-4.png 1007w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/7-4-300x58.png 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/7-4-768x149.png 768w\" sizes=\"auto, (max-width: 1007px) 100vw, 1007px\" \/><figcaption>figure(iv)<\/figcaption><\/figure>\n\n\n\n<p>if no error appear than compact this variable with return .in above (ii) and (iv)figure is matched<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>In blade file while  you click what  is the value of id u can check in blade file by passing  Edit{{&nbsp;$gall-&gt;id&nbsp;}} and result Edit3,Edit2 <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"216\" height=\"98\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/15-1.png\" alt=\"\" class=\"wp-image-18645\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"120\" height=\"302\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/16-1.png\" alt=\"\" class=\"wp-image-18646\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/16-1.png 120w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/16-1-119x300.png 119w\" sizes=\"auto, (max-width: 120px) 100vw, 120px\" \/><\/figure>\n\n\n\n<p>In database check value of id<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"488\" height=\"360\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/17-1.png\" alt=\"\" class=\"wp-image-18647\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/17-1.png 488w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/17-1-300x221.png 300w\" sizes=\"auto, (max-width: 488px) 100vw, 488px\" \/><\/figure>\n\n\n\n<p>You can Confirm value of id in controller also<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"346\" height=\"136\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/12-2.png\" alt=\"\" class=\"wp-image-18648\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/12-2.png 346w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/12-2-300x118.png 300w\" sizes=\"auto, (max-width: 346px) 100vw, 346px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"683\" height=\"149\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/13-3.png\" alt=\"\" class=\"wp-image-18649\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/13-3.png 683w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/13-3-300x65.png 300w\" sizes=\"auto, (max-width: 683px) 100vw, 683px\" \/><\/figure>\n\n\n\n<p>(v) while u running your view or blade file inspect the page in google chrome browser<br>(a) check network all script, css, bootstrap link working properly<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"781\" height=\"333\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/8-4.png\" alt=\"\" class=\"wp-image-18640\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/8-4.png 781w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/8-4-300x128.png 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/8-4-768x327.png 768w\" sizes=\"auto, (max-width: 781px) 100vw, 781px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"893\" height=\"283\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/9-2.png\" alt=\"\" class=\"wp-image-18641\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/9-2.png 893w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/9-2-300x95.png 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/9-2-768x243.png 768w\" sizes=\"auto, (max-width: 893px) 100vw, 893px\" \/><\/figure>\n\n\n\n<p>(b) if 404,500 error appear then your there is some bugs in ur code<br>200 shows ok status<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"921\" height=\"202\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/10-4.png\" alt=\"\" class=\"wp-image-18642\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/10-4.png 921w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/10-4-300x66.png 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/10-4-768x168.png 768w\" sizes=\"auto, (max-width: 921px) 100vw, 921px\" \/><\/figure>\n\n\n\n<p>(c) click console,source and debug to check syntax and logical error<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"893\" height=\"283\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/9-3.png\" alt=\"\" class=\"wp-image-18643\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/9-3.png 893w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/9-3-300x95.png 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/9-3-768x243.png 768w\" sizes=\"auto, (max-width: 893px) 100vw, 893px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"707\" height=\"286\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/11-2.png\" alt=\"\" class=\"wp-image-18644\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/11-2.png 707w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/09\/11-2-300x121.png 300w\" sizes=\"auto, (max-width: 707px) 100vw, 707px\" \/><\/figure>\n\n\n\n<p>(vi) run php artisan c:cache, php artisan route:cache, php artisan view :cache after manipulating,altering your code<\/p>\n\n\n<div class=\"epyt-gallery\" data-currpage=\"1\" id=\"epyt_gallery_88703\"><iframe loading=\"lazy\"  id=\"_ytid_93197\"  width=\"760\" height=\"427\"  data-origwidth=\"760\" data-origheight=\"427\" src=\"https:\/\/www.youtube.com\/embed\/?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  data-epytgalleryid=\"epyt_gallery_88703\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe><div class=\"epyt-gallery-list\"><div>Sorry, there was a YouTube error.<\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>To be master in finding error and build logic to make query, certain things should understand properly (i) check wheather your routing working properly or controller working properly(ii) connection between&#8230; <\/p>\n","protected":false},"author":31,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[5201],"tags":[6416,258,5653],"class_list":["post-18632","post","type-post","status-publish","format-standard","hentry","category-laravel","tag-cache","tag-error","tag-route"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/18632","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/31"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=18632"}],"version-history":[{"count":3,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/18632\/revisions"}],"predecessor-version":[{"id":24537,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/18632\/revisions\/24537"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=18632"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=18632"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=18632"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}