initial import
This commit is contained in:
36
app/Filament/Resources/PluginResource/Plugin.php
Normal file
36
app/Filament/Resources/PluginResource/Plugin.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user