Playing
02. A fresh project with Laravel Breeze

Episodes

0%
Your progress
  • Total: 3h 32m
  • Played: 0m
  • Remaining: 3h 32m
Join or sign in to track your progress

Transcript

00:00
so let's run through the process of getting a fresh laravel app set up I already have the laravel installer on my machine so I'm just going to go ahead and create out a new project called laravel file marketplace in here
00:13
hit enter on that and just wait for that to finish okay now that's done let's open this up in our editor and there it is, great so we're going to be using laravel breeze for this which is a scaffolding package for laravel, a first party scaffolding package
00:28
this will give us all the authentication features we need plus a few other bits which is just going to make it really easy for us to get this app set up so the first thing that we want to do is go ahead and install laravel breeze so within the project let's go ahead and pop that into the terminal
00:45
and while that's installing let's come down to this breeze and blade section we are just going to be using blade here with some live wire for our forms so once the package is downloaded we're just going to go ahead and say breeze install we're going to choose zero here for blade because that's what we're working with
01:04
we can add dark mode support if we want to but I'm just going to say no and I'm going to say no to pest for our test just for now now that's going to go ahead and run through the installation steps just here and we're going to need to migrate our database as well
01:18
so just while that is working away we're going to head over to our env file and we're going to come down to our database just here our database settings I'm using postgres again it doesn't matter if you are using mysql but I'm just going to change the settings around here most importantly my username
01:37
and I've already created this database just over here which at the moment is completely empty so we've got this installed we will need to run npm install and npm run dev as well if that hadn't already run so if we just do npm install and we can do npm run dev at the same time that's going to go ahead and just compile all of our assets for us
01:58
and it's going to bring this up so any changes we make will be instantly changed for us so let's go ahead and open up a new tab here and we're just going to run php artisan migrate to migrate our database so if we just head over to the browser here we should see the default welcome page
02:15
we can go ahead and register an account now log in and all of that good stuff what we are going to do though just before we do that is head over to our roots file because we want this to seem more like our app we're actually going to change this over to a home controller
02:29
so let's generate out a quick controller for this so make controller home controller and we can head straight over to that home controller and in here we're just going to go ahead and create an invocable method which will return a view so that's just going to show us a home view which we don't have just at the moment
02:49
so why don't we just go over to our views section and we're going to go ahead and rename welcome.blade.php just over to home.blade.php and I'm just going to get rid of everything in here and just put home we'll start this out in just a second
03:06
so now we can swap this over and we have a little bit more control over what is shown on our home page so I've just pulled in the full namespace to the home controller there so if we head back over sure enough we see home now as part of Breeze what we actually get are authenticated and unauthenticated views
03:27
so if we just head over to the browser here and we go over to register this is an unauthenticated view so we can actually use this component to render out a very simple home page so over on the home page we're going to go ahead and say ext guest layout
03:42
so that's a component within blade which is basically just a layout and we'll go ahead and create a div in here and since we're working with Tailwind CSS within Laravel Breeze we'll just use the text center class and we'll just say Laravel file marketplace
03:59
and that's pretty much our home page done and ready to go so now we can head over to register and actually register an account and this will verify if we've got everything set up properly so let's go ahead and enter our email address choose a password
04:14
hit register and we're in so we're over into our dashboard we've got all of the lovely functionality that we would expect to see in an app like our profile information of course we can go ahead and log out and we have this default dashboard page
34 episodes3 hrs 32 mins

Overview

Build a marketplace where sellers can list and sell files, while we take a cut of each sale using Stripe Connect.

We'll cover onboarding users with Stripe Connect, creating products and uploading files, payments, and delivering purchased files to your customers.

Here's everything we'll cover:

  • The Stripe Connect onboarding flow
  • Effortlessly creating products (and uploading files) with Livewire forms
  • Subdomains for your user's marketplace
  • Stripe Checkout for a beautiful, secure payment flow
  • Securely delivering files with Signed URLs in Laravel
  • Showing sales stats on a dashboard
Alex Garrett-Smith
Alex Garrett-Smith
Hey, I'm the founder of Codecourse!

Comments

No comments, yet. Be the first to leave a comment.