File: D:/HostingSpaces/Neopoints/momsecurity.be/app/Komma/Dynamic/Componentables/ComponentableType.php
<?php
namespace App\Komma\Dynamic\Componentables;
use App\Komma\Dynamic\Component\Component;
use App\Komma\Dynamic\ComponentType\ComponentType;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasOne;
/**
* App\Komma\Dynamic\Componentables\ComponentableType
*
* @property int $id
* @property int $component_type_id
* @property string|null $componentable_type
* @property string|null $model_collection_provider
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \App\Komma\Dynamic\ComponentType\ComponentType $componentType
* @method static \Illuminate\Database\Eloquent\Builder|\App\Komma\Dynamic\Componentables\ComponentableType whereComponentTypeId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Komma\Dynamic\Componentables\ComponentableType whereComponentableType($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Komma\Dynamic\Componentables\ComponentableType whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Komma\Dynamic\Componentables\ComponentableType whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Komma\Dynamic\Componentables\ComponentableType whereModelCollectionProvider($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Komma\Dynamic\Componentables\ComponentableType whereUpdatedAt($value)
* @mixin \Eloquent
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Komma\Dynamic\Component\Component[] $components
* @method static \Illuminate\Database\Eloquent\Builder|\App\Komma\Dynamic\Componentables\ComponentableType newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Komma\Dynamic\Componentables\ComponentableType newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Komma\Dynamic\Componentables\ComponentableType query()
*/
class ComponentableType extends Model
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = ['component_type_id', 'componentable_type', 'model_collection_provider'];
public function componentType():HasOne
{
return $this->hasOne(ComponentType::class);
}
public function components(): BelongsToMany
{
return $this->belongsToMany(Component::class);
}
}