You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
xshop/app/Models/Prop.php

68 lines
2.9 KiB
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Spatie\Translatable\HasTranslations;
/**
* App\Models\Prop
*
* @property int $id
* @property string $name
* @property string $label
* @property string $width
* @property int $required
* @property int $searchable
* @property string $type
* @property int $sort
* @property string|null $options
* @property int $priceable
* @property string|null $icon
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property \Illuminate\Support\Carbon|null $deleted_at
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Cat[] $category
* @property-read int|null $category_count
* @method static \Database\Factories\PropFactory factory(...$parameters)
* @method static \Illuminate\Database\Eloquent\Builder|Prop newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Prop newQuery()
* @method static \Illuminate\Database\Query\Builder|Prop onlyTrashed()
* @method static \Illuminate\Database\Eloquent\Builder|Prop query()
* @method static \Illuminate\Database\Eloquent\Builder|Prop whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|Prop whereDeletedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|Prop whereIcon($value)
* @method static \Illuminate\Database\Eloquent\Builder|Prop whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|Prop whereLabel($value)
* @method static \Illuminate\Database\Eloquent\Builder|Prop whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|Prop whereOptions($value)
* @method static \Illuminate\Database\Eloquent\Builder|Prop wherePriceable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Prop whereRequired($value)
* @method static \Illuminate\Database\Eloquent\Builder|Prop whereSearchable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Prop whereSort($value)
* @method static \Illuminate\Database\Eloquent\Builder|Prop whereType($value)
* @method static \Illuminate\Database\Eloquent\Builder|Prop whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|Prop whereWidth($value)
* @method static \Illuminate\Database\Query\Builder|Prop withTrashed()
* @method static \Illuminate\Database\Query\Builder|Prop withoutTrashed()
* @property string $unit
* @method static \Illuminate\Database\Eloquent\Builder|Prop whereUnit($value)
* @mixin \Eloquent
*/
class Prop extends Model
{
use HasFactory, SoftDeletes, HasTranslations;
protected $guarded = [];
protected $dates = ['created_at', 'updated_at', 'deleted_at'];
public $translatable = ['label'];
public function category()
{
return $this->belongsToMany(Cat::class);
}
}