23.11 Upload to live

This commit is contained in:
Kevin Adametz 2019-11-23 15:02:41 +01:00
parent 8cae2f92a4
commit 8ebdacec98
80 changed files with 7320 additions and 3937 deletions

View file

@ -77,6 +77,15 @@ use Illuminate\Database\Eloquent\SoftDeletes;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product query()
* @property int|null $weight
* @property int|null $show_at
* @property array|null $action
* @property-read int|null $attributes_count
* @property-read int|null $categories_count
* @property-read int|null $images_count
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product whereAction($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product whereShowAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product whereWeight($value)
*/
class Product extends Model
{
@ -152,7 +161,11 @@ class Product extends Model
}
public function images(){
return $this->hasMany('App\Models\ProductImage', 'product_id', 'id');
return $this->hasMany('App\Models\ProductImage', 'product_id', 'id')->orderBy('pos');
}
public function imagesActive(){
return $this->hasMany('App\Models\ProductImage', 'product_id', 'id')->where('active', true)->orderBy('pos');
}