Skip to content

Instantly share code, notes, and snippets.

@deathbearbrown
Created April 30, 2015 19:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deathbearbrown/59107523c419a1a911dd to your computer and use it in GitHub Desktop.
Save deathbearbrown/59107523c419a1a911dd to your computer and use it in GitHub Desktop.
An example of interacting with a model
<?php
require_once(__DIR__ . 'autoload.php');
require_once(API_BASE_PATH . '/utils/base-model.php');
$campaign = new CampaignModel();
$campaign->title = 'testing';
$campaign->save(); //created
$campaign->title = 'boogers';
$campaign->save(); //updated
$campaign->delete();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment