Created
February 6, 2017 16:49
-
-
Save anthonybudd/4313b490453b7756336e2ed85ef1e3dc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$product = new Product; | |
$product->color = 'white'; | |
$product->weight = 300; | |
$product->title = 'the post title'; | |
$product->content = 'the post content'; | |
$product->save(); | |
// OR | |
$product = new Product([ | |
'color' => 'blue', | |
'weight' => '250' | |
]); | |
$product->save(); | |
// OR | |
$product = Product::insert([ | |
'color' => 'blue', | |
'weight' => '250' | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment