| @@ -18,9 +18,8 @@ | ||
| 18 | 18 | 'content' |
| 19 | 19 | ]; |
| 20 | 20 | |
| 21 | 21 | /** |
| 22 | - * $searchable Columns in table to search | |
| 23 | 22 | * @var array |
| 24 | 23 | */ |
| 25 | 24 | protected $searchable = [ |
| 26 | 25 | 'title', |
| @@ -27,9 +26,17 @@ | ||
| 27 | 26 | 'content' |
| 28 | 27 | ]; |
| 29 | 28 | |
| 30 | 29 | /** |
| 31 | - * Local scope to filter subscribers by search/query string | |
| 30 | + * The attributes that should be cast. | |
| 31 | + * | |
| 32 | + * @var array | |
| 33 | + */ | |
| 34 | + protected $casts = [ | |
| 35 | + 'product_id' => 'integer' | |
| 36 | + ]; | |
| 37 | + | |
| 38 | + /** | |
| 32 | 39 | * @param ModelQueryBuilder $query |
| 33 | 40 | * @param string $search |
| 34 | 41 | * @return ModelQueryBuilder |
| 35 | 42 | */ |
| @@ -49,11 +56,10 @@ | ||
| 49 | 56 | return $query; |
| 50 | 57 | } |
| 51 | 58 | |
| 52 | 59 | /** |
| 53 | - * Local scope to filter subscribers by search/query string | |
| 54 | 60 | * @param ModelQueryBuilder $query |
| 55 | - * @param array $statuses | |
| 61 | + * @param int $productId | |
| 56 | 62 | * @return ModelQueryBuilder |
| 57 | 63 | */ |
| 58 | 64 | public function scopeProductBy($query, $productId) |
| 59 | 65 | { |
| @@ -64,9 +70,8 @@ | ||
| 64 | 70 | return $query; |
| 65 | 71 | } |
| 66 | 72 | |
| 67 | 73 | /** |
| 68 | - * One2Many: Customer has to many Click Tickets | |
| 69 | 74 | * @return Model Collection |
| 70 | 75 | */ |
| 71 | 76 | public function person() |
| 72 | 77 | { |
| @@ -77,9 +82,8 @@ | ||
| 77 | 82 | ); |
| 78 | 83 | } |
| 79 | 84 | |
| 80 | 85 | /** |
| 81 | - * One2Many: Customer has to many Click Tickets | |
| 82 | 86 | * @return Model Collection |
| 83 | 87 | */ |
| 84 | 88 | public function product() |
| 85 | 89 | { |