For demonstration purpose only
- Stripe account
- Cloudinary account
$ composer install
$ cp .env.example .env
$ php artisan key:generate
Add your database, Stripe and Cloudinary credentials into the .env
file.
$ php artisan migrate
OPTIONAL: adds 10 fake users and 10 fake posts
$ php artisan db:seed
Manually add your Stripe products in plans
table, including Stripe Id.
$ 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');
OPTIONAL: If you prefer to use Laravel public disk storage instead Cloudinary:
$ php artisan storage:link
$ php artisan serve
- 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