Snippets

Cleanly Setting Axios Base URL

Playing
Cleanly Setting Axios Base URL
6 mins4 years ago

Two methods for setting Axios' base URL in your projects instead of using it directly from config.

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

Comments

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

Suggested courses

Build a File Marketplace with Laravel

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

34 episodes
3 hrs 32 mins

Build a Referral System with Laravel

Let's build a feature complete Laravel referral system, completely from scratch. We’ll cover generating referral codes, setting a cookie to track the referral process, hooking up referrals to subscriptions and displaying detailed referral stats in a dashboard, so your users can see how they're doing. On the admin side, we'll set up a job to automatically generate a CSV with all the amounts you need to pay out each month, automatically mark referrals as paid, and display historical referral payments for users.

24 episodes
2 hrs 39 mins

Build a URL Shortener with Volt and Folio

Volt is a functional API for Livewire that allows you to build Livewire components in a single file, alongside Blade templates. Pairing this with automatic route creation using Laravel Folio gives us a serious productivity boost. So, let’s build a URL shortener while learning how Volt and Folio work!

10 episodes
53 mins

Build a Pay Once For Access App

Let's do payments right with the Stripe Payment Intent API, and build an app where customers can pay to access a members area. We'll cover setting up a Payment Intent, process payments correctly with authorization, handle declines, and securely respond to a Stripe webhook to upgrade a member. This course is for you if: - You want to process payments to upgrade customers for access - You need to learn how to properly process one-off payments with Stripe - You need a refresher on the Payment Intents API

15 episodes
1 hr 11 mins

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