This episode is for members only

Sign up to access "Build an Appointment Booking System With Laravel" right now.

Get started
Already a member? Sign in to continue
Playing
02. Fresh project with Pest

Episodes

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

Transcript

00:00
okay this might be pretty obvious to you but we're going to go ahead and set up a fresh Laravel project now with pest we're going to run these tests so we make sure that everything is working then we can get building okay so we're going to go ahead and use the Laravel installer to create a new
00:12
project called Laravel booking system let's go ahead and choose no starter kit here and of course we'll choose pest for our tests although you can change that over to phpunit and we won't initialize a git repository just yet okay so once that's done we're going to go ahead and choose mysql as
00:26
our database and we're just going to wait for everything to finish up okay now that's done let's open our project up and we can get started on doing everything that we need to do so let's go ahead and run our migrations first just to get them out and running we
00:39
don't have the database created so let's create that first of all and if we add over to the database you can see we've just got the standard stuff in here okay so in terms of running our pest test the first thing that we're going to do is come over to
00:52
phpunit.xml and we're going to make sure that we are using xqlite and the in-memory database drive that's really important so we don't go ahead and insert anything into our actual database while we're testing
01:07
so if you're new to testing and you're new to pest let's go over to our test directory and you can see that we've got two example tests already here written in the pest functional style so we can go ahead and just run pest on the command line if you don't
01:21
already have this you might need to go ahead and create an alias for this something like this and save that out and let's go ahead and run pest so there we go we've got two tests working and of course that shouldn't have created anything in the database because
01:35
we've now swapped this over to use xqlite so before we get started i'm going to go ahead and get rid of these two tests we can use the command line to create any tests that we need a little bit later on and to be honest that is pretty much it we should now have
01:49
an application up and running that we can start to build our core functionality in so in the next section we're going to focus on this core functionality and we're going to build up all of these custom classes that we need to get this working
02:01
and then once we've done that we can go ahead and build the ui on top of it so there we go a really simple lara application setup our tests are running so we can make sure everything's working properly and still working if we make any changes
37 episodes4 hrs 49 mins

Overview

Building an availability calendar and booking system is a notoriously difficult problem to solve. That’s exactly what we’re going to cover in this course.

Step by step, we’ll build an appointment slot generator that calculates availability based on employee schedules, employee’s booked time off, the length of service chosen, existing appointments, and cancelled appointments.

For maximum flexibility, we’ll also allow multi-employee availability checks, so we’ll be able to see every employee who can perform a service (and their available slots).

To finish up, we’ll build a simple UI with Alpine.js, with a beautiful booking calendar that shows detailed availability across multiple dates, the ability to choose a time slot — and finally the ability to book an appointment.

Phew. We’ve got a lot to learn — let’s build a booking system with Laravel!

Alex Garrett-Smith
Alex Garrett-Smith
Hey, I'm the founder of Codecourse!

Episode discussion

No comments, yet. Be the first!