Skip to content

Instantly share code, notes, and snippets.

View mdcass's full-sized avatar

Mike Casson mdcass

View GitHub Profile
@mdcass
mdcass / ChainableClass.php
Last active April 9, 2017 22:37
Chainable class container
<?php
/**
* Interface for classes which can be used in a ChainableClassContainer
*/
interface ChainableClass
{
public function handle();
}
@mdcass
mdcass / BaseTransformer.php
Last active August 25, 2022 12:52
Transformer pattern in Laravel 5
<?php
namespace App\Transformers;
/**
* Class BaseTransformer
*/
class BaseTransformer
{
/**
* The model or models to be transformed
@mdcass
mdcass / SectionTest.php
Created December 8, 2017 10:38
Laravel Test debugging
<?php
namespace Tests\Feature\Api\V1\CMS;
use App\Models\User;
use CMS\Models\Page;
use CMS\Models\Section;
use Faker\Generator as Faker;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Tests\TestCase;