Files
ai-stylegallery/app/Filament/Resources/PluginResource/Plugin.php

37 lines
813 B
PHP

<?php
namespace App\Filament\Resources\PluginResource;
use Illuminate\Database\Eloquent\Model;
class Plugin extends Model
{
protected $table = null; // No actual table
protected $guarded = []; // Allow mass assignment for all attributes
public $incrementing = false;
protected $keyType = 'string';
protected $primaryKey = 'id';
public function __construct(array $attributes = [])
{
parent::__construct($attributes);
foreach ($attributes as $key => $value) {
$this->$key = $value;
}
}
public function newCollection(array $models = [])
{
return new \Illuminate\Database\Eloquent\Collection($models);
}
public function newEloquentBuilder($query)
{
return new CollectionEloquentBuilder($query);
}
}