PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.4
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.4
1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 trunk 1.2.0 All 47 releases
fluent-cart / app / Models / AttributeRelation.php

AttributeRelation.php in FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler 1.6.4, at app/Models/AttributeRelation.php

40 lines 731 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentCart\App\Models;
4
5 /**
6 * Attributes Relations Model - DB Model for Attributes Terms to Specific Variations
7 * Maybe we don't need this model. For now, it's here
8 *
9 * Database Model
10 *
11 * @package FluentCart\App\Models
12 *
13 * @version 1.0.0
14 */
15 class AttributeRelation extends Model
16 {
17 protected $table = 'fct_atts_relations';
18
19 protected $fillable = [
20 'group_id',
21 'term_id',
22 'object_id',
23 ];
24
25 public function group()
26 {
27 return $this->belongsTo(AttributeGroup::class, 'group_id', 'id');
28 }
29
30 public function term()
31 {
32 return $this->belongsTo(AttributeTerm::class, 'term_id', 'id');
33 }
34
35 public function productDetails()
36 {
37 return $this->belongsTo(ProductDetail::class, 'object_id', 'id');
38 }
39 }
40