Skip to content

Instantly share code, notes, and snippets.

View hackel's full-sized avatar

Ryan Hayle hackel

  • Minneapolis, USA
View GitHub Profile
@hackel
hackel / DropUnsetAttributes.php
Created March 8, 2017 18:47
Trait for Jenssegers/Mongodb models that will automatically unset any attributes contained in the $clearable (or $fillable) property.
<?php
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Arr;
/**
* Class DropUnsetAttributes will drop any fields contained in the model's $clearable
* array if they are not included in the attributes on mass-assignment (fill).
*
* @package Quirks\ModelTraits
" My cVim configuration
@hackel
hackel / SentryAuthAdapter.php
Last active June 24, 2021 14:48
SentryAuthAdapter for using Tymon\JWTAuth with Cartalyst\Sentry
<?php namespace MyApp\Providers;
use Exception;
use Cartalyst\Sentry\Sentry;
use Cartalyst\Sentry\Users\UserInterface;
use Tymon\JWTAuth\Providers\Auth\AuthInterface;
class SentryAuthAdapter implements AuthInterface
{
/**