Skip to content

Instantly share code, notes, and snippets.

View daugaard47's full-sized avatar

Chris daugaard47

View GitHub Profile
[{"intro":{"title":"Introduction","group_title":"Setting up","group_anchor":"setting_up","anchor":"intro","section_anchor":"intro","subsection_anchors":null,"path":"/","gate":false,"data":{"section_type":"generic","title":"Stripe.js reference","description":"This reference documents every object and method available in Stripe’s browser-side JavaScript library, Stripe.js.\nUse our [React Stripe.js reference](/docs/stripe-js/react) if you want to add Elements to your React based app.\n\nYou can use Stripe.js’ APIs to tokenize customer information,\ncollect sensitive payment details using customizable [Stripe Elements](/docs/payments/elements),\nand accept payments with [browser payment APIs](/docs/stripe-js/elements/payment-request-button)\nlike Apple Pay and the Payment Request API.\n","section_tag":"intro"},"display_on_load":true},"including_stripe_js":{"title":"Including Stripe.js","group_title":"Setting up","group_anchor":"setting_up","anchor":"including_stripe_js","section_anchor":"including_stripe_js","su
@daugaard47
daugaard47 / diedump.php
Created March 8, 2022 05:33
CodeCourse DD
^ App\Models\Variation {#1517 ▼
#connection: "mysql"
#table: "variations"
#primaryKey: "id"
#keyType: "int"
+incrementing: true
#with: []
#withCount: []
+preventsLazyLoading: false
#perPage: 15
{
/**
* Better Defaults
**/
"editor.copyWithSyntaxHighlighting": false,
"diffEditor.ignoreTrimWhitespace": false,
"editor.emptySelectionClipboard": false,
"workbench.editor.enablePreview": false,
"window.newWindowDimensions": "inherit",
"editor.multiCursorModifier": "ctrlCmd",
@daugaard47
daugaard47 / Subscribe.php
Created July 25, 2021 04:53
Get customers on same payment schedule in Stripe
<?php
//THIS IS ONLY A SNIPPET
namespace App\Http\Livewire\Subscribe;
class Subscribe extends Component
{
/*
@daugaard47
daugaard47 / TripInquireHomeFormController.php
Created December 5, 2020 23:46
Regular Laravel Honey Package
<?php
namespace App\Http\Controllers\Email\TripInquire;
use App\Http\Controllers\Controller;
use App\Mail\TripInquire\Staff\TripInquireHomeEmail;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Mail;
class TripInquireHomeFormController extends Controller
@daugaard47
daugaard47 / ContactForm.php
Created December 5, 2020 23:21
Honey Livewire
<?php
namespace App\Http\Livewire\Contact;
use Livewire\Component;
use Lukeraymonddowning\Honey\Traits\WithHoney;
use Lukeraymonddowning\Honey\Traits\WithRecaptcha;
class ContactForm extends Component
{
@daugaard47
daugaard47 / paymentstep.blade.php
Created December 3, 2020 04:04
Livewire Stripe Elements Cashier
<div>
<form action="#" class="bg-white overflow-hidden shadow-xl rounded">
<div class="border-b border-cc-navy-200 px-4 py-6 bg-gradient-to-r from-cc-blue-700 via-cc-blue-700 to-cc-blue-600 sm:px-6 rounded-t">
<h2 class="text-lg leading-8 font-medium text-white">
Payment Information:
</h2>
<div>
<p class="text-lg leading-5 text-cc-blue-300">
Please provide a valid credit or debit card to make your purchase.
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Stripe\Stripe;
class PaymentController extends Controller {
public function index() {
return view('test-payment');
@daugaard47
daugaard47 / git-commands.md
Last active December 6, 2020 14:27
Git Commands

Make Develop your default branch. If you only have a master branch, Create new develop banch. (See create a new branch below) This is where you will work 85% of the time. Only use Master branch for production ready code.

If you add a new feature, go to develop branch and then create a new branch with feature name. (See create a new branch below)

  • Once you're done with the new feature, Merge to develop.
  • Push to staging server and test (optional).
  • If all good on staging serve, switch to master beanch and merge develop branch into master.
  • Then switch back to develop branch and delete the new feature branch. (Sometimes you will have merge confilct due to CSS etc.. I use https://www.sublimemerge.com/ free version to fix these issues)
@daugaard47
daugaard47 / Livewire Intervention Image File Upload
Created August 18, 2020 04:48
Upload images with Livewire and compress with Intervention Image.
//HTML
<div class="avatar-file">
<label class = "text-bh-navy-500">Choose Image</label>
<input type = "file" wire:model = "avatar">
</div>
//LW Component
use WithFileUploads;
public $avatar;