Snippets

Laravel Sanctum (Airlock) with Postman

Playing
Laravel Sanctum (Airlock) with Postman
12 mins4 years ago

You've got Sanctum up and running for authentication, but it's cookie based, so making requests to your API with Postman is a little more complicated. This snippet shows you how.

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

Comments

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

Suggested courses

Laravel

Build an Appointment Booking System With Laravel

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!

37 episodes
4 hrs 49 mins
Laravel

Logging Unique Views in Laravel with Redis

If you need to log unique views in Laravel, you might reach for a database table to track IP addresses or another unique piece of data. Let's take a look at speeding things up both in performance and complexity by using Redis and the HyperLogLog probabilistic data structure. Once we're done, we'll set up a period command to sync views back to the database for easy ordering, and then create a trait to share functionality between other models.

4 episodes
22 mins
Laravel

Liking Things in Laravel with Redis

Let’s skip the database and build the ability to like any model in Laravel, using Redis. Traditionally you’d reach for the database for this kind of thing, but as you load more models and start performing checks within relationships — things begin to slow down. With a key-value store like Redis, tracking users who have liked comments (or anything) keeps everything ridiculously fast.

6 episodes
21 mins
Laravel

reCAPTCHA with Laravel

Adding Google reCAPTCHA to a Laravel form isn’t too much trouble, but what happens when we want to re-use it for other forms? This course focuses on setting up reCAPTCHA using Alpine.js to fetch the token, and then middleware to verify the token based on a threshold in our config. We’ll add a Blade directive too, so we’re able to easily use reCAPTCHA for any forms in our Laravel apps — just by adding a couple of lines of code.

8 episodes
49 mins
Laravel

Enums in Laravel

Enums make working with multiple potential column values a breeze (think order statuses). Let's use an Enum in Laravel and cover storing, validating and accessing Enums. By the end of the course, you'll be able to implement Enums in Laravel with ease, and make sure your multiple choice column data is strict and easy to globally update across your entire application.

9 episodes
31 mins