Update pricing UX, billing flows, and API rules
This commit is contained in:
@@ -15,11 +15,6 @@ class DatabaseSeeder extends Seeder
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
// User::factory(10)->create();
|
||||
|
||||
User::factory()->create([
|
||||
'name' => 'Test User',
|
||||
'email' => 'test@example.com',
|
||||
]);
|
||||
$this->call(PricingPlanSeeder::class);
|
||||
}
|
||||
}
|
||||
|
||||
27
app/database/seeders/PricingPlanSeeder.php
Normal file
27
app/database/seeders/PricingPlanSeeder.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\PricingPlan;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class PricingPlanSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
$defaults = config('dewemoji.pricing.defaults', []);
|
||||
foreach ($defaults as $plan) {
|
||||
PricingPlan::updateOrCreate(
|
||||
['code' => $plan['code']],
|
||||
[
|
||||
'name' => $plan['name'],
|
||||
'currency' => $plan['currency'],
|
||||
'amount' => $plan['amount'],
|
||||
'period' => $plan['period'],
|
||||
'status' => $plan['status'],
|
||||
'meta' => $plan['meta'] ?? null,
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user