{"id":8541,"date":"2020-01-09T13:23:53","date_gmt":"2020-01-09T13:23:53","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=8541"},"modified":"2021-11-15T06:18:31","modified_gmt":"2021-11-15T06:18:31","slug":"how-to-login-registration-with-session-in-laravel","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/how-to-login-registration-with-session-in-laravel\/","title":{"rendered":"How to login &#038; Registration with  Session in laravel."},"content":{"rendered":"\n<script src=\"https:\/\/gist.github.com\/samcotocus\/aa853361d8c1f262f6dec993b94fa95d.js\"><\/script>\n\n\n\n<script src=\"https:\/\/gist.github.com\/samcotocus\/587e770b48770094b9e6b10200c64a6e.js\"><\/script>\n\n\n\n<p>\n\nAfter successfully install laravel Application, Go to your project .env file and set up database credential and move next step :\n\n<\/p>\n\n\n\n<p> Next, migrate the table into the database using the below command :<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/samcotocus\/1b099e431736bd46a5136be7563842e0.js\"><\/script>\n\n\n\n<p>\n\nIn this step, we will create some routes like custom login route, custom registration route, post data route, and dashboard, etc.\n\n<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/samcotocus\/f78038358291c76fe694717bbc5f2e4d.js\"><\/script>\n\n\n\n<p>\n\nWe need to create a controller name AuthController. Use the below command and create Controller :\n\n<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/samcotocus\/a0f80577927de5ae27c17981f34a8767.js\"><\/script>\n\n\n\n<p>\n\nAfter successfully create controller go to<strong>&nbsp;app\/controllers\/AuthController.php<\/strong>&nbsp;and update the below code in your controller:\n\n<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/samcotocus\/d5042912090bb1c15bbecee6b04741bf.js\"><\/script>\n\n\n\n<p>  Now you can create login.blade.php file and update the below code into your file: <\/p>\n\n\n\n<<script src=\"https:\/\/gist.github.com\/samcotocus\/bc6136d36cef962d075dd659827407ac.js\"><\/script>\n\n\n\n<p>\n\nNow you can create registration.blade.php file and update the below code into your file\n\n<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/samcotocus\/2ec4930f91fb3b6452159d800c945390.js\"><\/script>\n\n\n\n<p>\n\nNow you can create dashboard.blade.php file and update the below code into your file\n\n<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/samcotocus\/a5621a77f99fdbad818462e6ef81890d.js\"><\/script>\n\n\n\n<p>\n\nWe need to start the development server. Use the PHP artisan serve command and start your server :\n\n<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"557\" height=\"58\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/01\/image-25.png\" alt=\"\" class=\"wp-image-8546\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/01\/image-25.png 557w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/01\/image-25-300x31.png 300w\" sizes=\"auto, (max-width: 557px) 100vw, 557px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"563\" height=\"70\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/01\/image-26.png\" alt=\"\" class=\"wp-image-8547\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/01\/image-26.png 563w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/01\/image-26-300x37.png 300w\" sizes=\"auto, (max-width: 563px) 100vw, 563px\" \/><\/figure>\n\n\n\n<p> <a href=\"http:\/\/127.0.0.1:8000\/\">http:\/\/127.0.0.1:8000\/<\/a>  now go to this url <\/p>\n\n\n<div class=\"epyt-gallery\" data-currpage=\"1\" id=\"epyt_gallery_26084\"><iframe loading=\"lazy\"  id=\"_ytid_62862\"  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_26084\"  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>After successfully install laravel Application, Go to your project .env file and set up database credential and move next step : Next, migrate the table into the database using the&#8230; <\/p>\n","protected":false},"author":15,"featured_media":8565,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[5201,5150],"tags":[5629,5203,897,5630,5631],"class_list":["post-8541","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-laravel","category-php","tag-file-upload","tag-laravel","tag-login","tag-registration","tag-session"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/8541","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\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=8541"}],"version-history":[{"count":4,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/8541\/revisions"}],"predecessor-version":[{"id":25186,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/8541\/revisions\/25186"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/8565"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=8541"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=8541"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=8541"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}