Creating a new project | #03 - Setting up authentication

in #dev5 years ago

If you haven't read the last post you can find it here

<hr /> **TLDR** I am building a web application from scratch using PHP Laravel and learning in the process, the application will be a Recipe sharing app that I will build on overtime. <hr /> In the last post, I spoke about setting the environment up. Now I've been starting on the backend. <br /> <br /><br /> <br /> After creating a basic startup Laravel project I wanted to add Authentication straight off the bat. The ability for a user to register and login is the bases of the whole application, so I thought it was important to get that right from the get-go. <br /> <br /> Laravel makes creating authentication super easy and can create using one simple Artisan command <br /> <br /><br /> <br /> When running this command, Laravel does all the hard work for you, even done to creating the routes for you. <br /> <br /> <pre><code>Auth::routes(); <p dir="auto">All the views are creaed:<br /> <br /><br /> <img src="https://images.hive.blog/768x0/https://files.steempeak.com/file/steempeak/slayerkm/tl132z01-Screenshot202019-07-2520at2008.34.40.png" alt="Screenshot 20190725 at 08.34.40.png" srcset="https://images.hive.blog/768x0/https://files.steempeak.com/file/steempeak/slayerkm/tl132z01-Screenshot202019-07-2520at2008.34.40.png 1x, https://images.hive.blog/1536x0/https://files.steempeak.com/file/steempeak/slayerkm/tl132z01-Screenshot202019-07-2520at2008.34.40.png 2x" /><br /> <br /><br /> Within 10 minutes I have auth all setup and working, I am now apple to register/log in. The Next step is to get the CRUD functionality built for users to create posts ('recipes'). This is something that will start basic and be built on overtime.<br /> <br /><br /> In the next post, I will show you the app in its current state. I'm focusing on the backend more than the front end styling currently, so it won't look anything special haha! <hr /> Thanks for reading and following the process, I'd love to hear from you. Feel free to drop a comment below. Feedback is key to my learning!<span> <img src="https://images.hive.blog/768x0/https://files.steempeak.com/file/steempeak/slayerkm/wt0FR0mQ-Screenshot202019-07-2520at2008.15.15.png" srcset="https://images.hive.blog/768x0/https://files.steempeak.com/file/steempeak/slayerkm/wt0FR0mQ-Screenshot202019-07-2520at2008.15.15.png 1x, https://images.hive.blog/1536x0/https://files.steempeak.com/file/steempeak/slayerkm/wt0FR0mQ-Screenshot202019-07-2520at2008.15.15.png 2x" /> <span> <img src="https://images.hive.blog/768x0/https://files.steempeak.com/file/steempeak/slayerkm/uwPokcC2-Screenshot202019-07-2520at2008.29.25.png" srcset="https://images.hive.blog/768x0/https://files.steempeak.com/file/steempeak/slayerkm/uwPokcC2-Screenshot202019-07-2520at2008.29.25.png 1x, https://images.hive.blog/1536x0/https://files.steempeak.com/file/steempeak/slayerkm/uwPokcC2-Screenshot202019-07-2520at2008.29.25.png 2x" />