first commit
This commit is contained in:
44
app/Models/MediaCollection.php
Normal file
44
app/Models/MediaCollection.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class MediaCollection
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $key
|
||||
* @property string $name
|
||||
* @property string $description
|
||||
* @property bool $is_system
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property Collection|Media[] $media
|
||||
*/
|
||||
class MediaCollection extends Model
|
||||
{
|
||||
protected $table = 'media_collections';
|
||||
|
||||
protected $casts = [
|
||||
'is_system' => 'bool',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'key',
|
||||
'name',
|
||||
'description',
|
||||
'is_system',
|
||||
];
|
||||
|
||||
public function media()
|
||||
{
|
||||
return $this->hasMany(Media::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user