Page MenuHomePhorge

2020_10_29_100000_add_beta_skus.php
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

2020_10_29_100000_add_beta_skus.php

<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
// phpcs:ignore
class AddBetaSkus extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if (!\App\Sku::where('title', 'beta')->first()) {
\App\Sku::create([
'title' => 'beta',
'name' => 'Beta program',
'description' => 'Access to beta program subscriptions',
'cost' => 0,
'units_free' => 0,
'period' => 'monthly',
'handler_class' => 'App\Handlers\Beta',
'active' => false,
]);
}
if (!\App\Sku::where('title', 'meet')->first()) {
\App\Sku::create([
'title' => 'meet',
'name' => 'Video chat',
'description' => 'Video conferencing tool',
'cost' => 0,
'units_free' => 0,
'period' => 'monthly',
'handler_class' => 'App\Handlers\Beta\Meet',
'active' => true,
]);
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
// there's no need to remove these SKUs
}
}

File Metadata

Mime Type
text/x-php
Expires
Fri, Apr 24, 1:38 PM (23 h, 42 m ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
04/39/dc2feb7fa636ca7d0a4186b341c1
Default Alt Text
2020_10_29_100000_add_beta_skus.php (1 KB)

Event Timeline