This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// extract all headers | |
var headers = [] | |
function walk (nodes) { | |
nodes.forEach((node) => { | |
var sub = Array.from(node.childNodes) | |
if (sub.length) { | |
walk(sub) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use App\Models\StripePlan; | |
use App\Models\Team; | |
use Illuminate\Http\Request; | |
use Illuminate\Support\Facades\Log; | |
use Illuminate\Support\Facades\Schema; | |
use Illuminate\Support\ServiceProvider; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Models; | |
class User extends Authenticatable implements MustVerifyEmail | |
{ | |
public function plan(): BelongsTo | |
{ | |
return $this->hasOne(StripePlanUser::class); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use App\Models\StripePlan; | |
use App\Models\Team; | |
use Illuminate\Http\Request; | |
use Illuminate\Support\Facades\Log; | |
use Illuminate\Support\Facades\Schema; | |
use Illuminate\Support\ServiceProvider; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Observers; | |
use App\Models\StripePlan; | |
use App\Shared\Services\Stripe\API as StripeAPI; | |
class StripePlanObserver | |
{ | |
public function created(StripePlan $stripePlan): void |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Database\Migrations\Migration; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Support\Facades\Schema; | |
class CreateStripePlansTable extends Migration | |
{ | |
public function up(): void | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use App\Models\StripePlan; | |
use Laravel\Nova\Observable; | |
use App\Observers\StripePlanObserver; | |
/** | |
* Bootstrap any application services. | |
* | |
* @return void |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Shared\Stripe; | |
use DomainException; | |
use Illuminate\Support\Facades\Log; | |
use Illuminate\Support\Str; | |
use Stripe\Exception\ApiErrorException; | |
use Stripe\Plan; | |
use Stripe\Product; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Nova\Resources; | |
class Plan extends Resource | |
{ | |
public function fields(Request $request): array | |
{ | |
return [ | |
Text::make('Name'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defaults write -g InitialKeyRepeat -int 10 | |
defaults write -g KeyRepeat -int 1 | |
defaults write http://com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticQuoteSubstitutionEnabled" -bool false | |
defaults write com.apple.dock static-only -bool TRUE; killall Dock |
NewerOlder