Skip to content

Instantly share code, notes, and snippets.

View patrickisgreat's full-sized avatar

Patrick Bennett patrickisgreat

View GitHub Profile
@patrickisgreat
patrickisgreat / LaravelExample.php
Created August 3, 2015 16:14
Quick and Dirty Laravel Many to Many example
//So you have your pivot table all set up.... So in a "Role," model (ha!) you would set up a many to many relationship like so:
<?php
public function users()
{
return $this->belongsToMany('\App\User');
}
//and in your User model you would do something like:
public function roles()
{
@patrickisgreat
patrickisgreat / createDE.php
Created April 22, 2015 20:54
handle method creates 4 DEs in Exact Target via Fuel-SDK
/**
* Execute the command.
*
* @return void
*/
public function handle()
{
//boostrap SDK
$slncClient = new ET_Client('slnc');
$postDE = new ET_DataExtension();