Skip to content

Instantly share code, notes, and snippets.

View sandervanhooft's full-sized avatar

Sander van Hooft sandervanhooft

View GitHub Profile
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class EnsureDatabaseIs extends Command
{
/**
* The name and signature of the console command.
@sandervanhooft
sandervanhooft / cashier_mollie_exampe_basic.php
Last active May 20, 2022 13:02
Cashier Mollie basic example
<?php
// Create a new subscription
$user = User::find(1);
$user->newSubscription('main', 'monthly')
->trialDays(10)
->withCoupon('MADRID2019')
->create();
@sandervanhooft
sandervanhooft / .travis.yml
Created January 3, 2019 17:57
Check your Laravel package's framework version compatibility with Travis
language: php
sudo: false
php:
- 7.1
- 7.2
- 7.3
- nightly
@sandervanhooft
sandervanhooft / coding-snippet-pre.css
Last active April 9, 2018 12:34
Mail template code snippet css for pre tag based on ConvertKit editor
pre {
padding: 1em;
border: 1px solid #ddd;
border-radius: 3px;
background: #f8f8f8;
font-size: 90%;
line-height: 1.6em;
font-family: Menlo, Monaco, monospace, sans-serif !important;
}
@sandervanhooft
sandervanhooft / CanAssertFlash.php
Last active January 27, 2020 18:01
Assert flash for Laracasts/flash
<?php
namespace Tests;
trait CanAssertFlash
{
protected function assertFlash($level, $message, $important = false, $title = null, $overlay = false)
{
$expectedNotification = [
'title' => $title,