Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

cba85/laravel8-saas

Repository files navigation

Laravel SaaS

For demonstration purpose only

Deploy

Requirements

Install

1. Install

$ composer install
$ cp .env.example .env
$ php artisan key:generate

2. Update your credentials

Add your database, Stripe and Cloudinary credentials into the .env file.

3. Migrate your database

$ php artisan migrate

OPTIONAL: adds 10 fake users and 10 fake posts

$ php artisan db:seed

4. Store your Stripe products in your database

Manually add your Stripe products in plans table, including Stripe Id.

5. Create a super admin user

$ php artisan tinker
use Spatie\Permission\Models\Permission;
$permission = Permission::create(['name' => 'admin']);

use Spatie\Permission\Models\Role;
$role = Role::create(['name' => 'Super Admin']);

$user = User::find(1); // Change 1 by the user id you want to make super admin
$user->giveRoleTo('Super Admin');
//$user->givePermissionTo('admin');

6. File storage

OPTIONAL: If you prefer to use Laravel public disk storage instead Cloudinary:

$ php artisan storage:link

Usage

$ php artisan serve

Features

  • Stripe subscription using Laravel Cashier
  • User "super admin" role and permission using Laravel Permission
  • Image upload using Cloudinary
  • API Authentication using Laravel Sanctum
  • Stripe subscription API

Dependencies