PluginProbe
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments / 3.4.1
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments v3.4.1
4.7.2 4.7.1 4.7.0 4.6.6 4.6.5 4.6.4 4.6.3 4.6.2 4.6.1 4.6.0 4.5.1 4.5.0 4.4.2 4.4.1 4.4.0 4.3.3 4.3.2 4.3.1 4.3.0 4.2.3 4.2.2 4.2.1 1.0.3 1.0.4 1.0.5 All 281 releases
surecart / app / src / Models / VariantOptionValue.php
VariantOptionValue.php
55 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace SureCart\Models;
3
4 use SureCart\Models\DatabaseModel;
5
6 /**
7 * The integration model.
8 */
9 class VariantOptionValue extends DatabaseModel {
10 /**
11 * The integrations table name.
12 *
13 * @var string
14 */
15 protected $table_name = 'surecart_variant_option_values';
16
17 /**
18 * The object name
19 *
20 * @var string
21 */
22 protected $object_name = 'variant_option_values';
23
24 /**
25 * Fillable items.
26 *
27 * @var array
28 */
29 protected $fillable = [ 'id', 'value', 'name', 'post_id', 'product_id', 'account_id', 'updated_at', 'created_at' ];
30
31 /**
32 * Create a new model
33 *
34 * @param array $attributes Attributes to create.
35 *
36 * @return $this|false
37 */
38 protected function create( $attributes = [] ) {
39 $attributes['account_id'] = \SureCart::account()->id;
40 return parent::create( $attributes );
41 }
42
43 /**
44 * Update a model
45 *
46 * @param array $attributes Attributes to create.
47 *
48 * @return $this|false
49 */
50 protected function update( $attributes = [] ) {
51 $attributes['account_id'] = \SureCart::account()->id;
52 return parent::update( $attributes );
53 }
54 }
55