Models and migrations

142 views
22 hours watched
8 completions

Let's set up the Laravel project with the models, migrations, and views we need.

Video thumbnail

Log in

This lesson is free, but you need to log in to get full access to the video and lesson content.

Join 4.3K+ learners from companies like Shopify, Microsoft, Tiktok, AppSumo and Instacart.

Creating Models and Migrations

We started by setting up the necessary models and migrations for our project. Here's what we accomplished:

  1. Created the LinkPage model and migration
  2. Created the Link model and migration
  3. Set up Laravel Cashier for handling subscriptions

Running Migrations

After creating the models and migrations, we executed the following steps:

  1. Ran the Cashier command to set up subscription-related tables
  2. Published the migration files
  3. Ran the migrations to create the necessary database tables

Updating the User Model

We updated the User model to include the Billable trait for Cashier functionality:

use Laravel\Cashier\Billable; class User extends Authenticatable { use...

This lesson is free, but you need to log in to view it.

Login →