Skip to content

Instantly share code, notes, and snippets.

@anthonybudd
Created February 6, 2017 16:53
Show Gist options
  • Select an option

  • Save anthonybudd/1feee858a6f95c2eabb5bee22d19e6f7 to your computer and use it in GitHub Desktop.

Select an option

Save anthonybudd/1feee858a6f95c2eabb5bee22d19e6f7 to your computer and use it in GitHub Desktop.
<?php
$product = new Product;
$product->new; // Returns (bool) true
$product = Product::find(15);
$product->new; // Returns (bool) false
$product->color = 'red';
$product->dirty; // Returns (bool) true
$product->save();
$product->dirty; // Returns (bool) false
$product->title; // Returns the post title
$product->content; // Returns the post content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment