Skip to content

Instantly share code, notes, and snippets.

View Keoghan's full-sized avatar

Keoghan Litchfield Keoghan

View GitHub Profile

Keybase proof

I hereby claim:

  • I am keoghan on github.
  • I am keoghan (https://keybase.io/keoghan) on keybase.
  • I have a public key ASBJJvtuJUTl17kWbT_Qi2gkS0FjQS2gXAjoQRskh_ruUQo

To claim this, I am signing this object:

#Laravel Valet HTTPS

Prior to Valet 1.1 you could user HAproxy After the introduction of Caddy server in Valet 1.1 you can add a simple file. (Recommend still generating a certificate to use for now).

Assuming we are using .dev domain.

#Valet 1.1+

Build a certificate (see next section)

@Keoghan
Keoghan / ExpiringScope.php
Created November 11, 2015 23:48
Global Scope for use with the ExpiresTrait. Deals with removing bindings from nested where clauses from the global query when removing.
<?php
namespace Whitebox\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\ScopeInterface;
use Illuminate\Database\Query\Builder as QueryBuilder;
@Keoghan
Keoghan / Expires.php
Created November 11, 2015 23:47
A simple Expires trait for use in a laravel app on an Eloquent model. Requires ExpiringScope
<?php
namespace App;
use Carbon\Carbon;
trait Expires
{
public static function bootExpires()
{
@Keoghan
Keoghan / AssignsRoles.php
Last active November 11, 2015 23:45
Trait to work with Silber Bouncer to add some role assignment helpers.
<?php
namespace App;
use Illuminate\Support\Str;
use Silber\Bouncer\Database\Role;
/**
* Trait AssignsRoles.
* Works with Silber\Bouncer to add some role assignment helpers

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post