mirror of
https://github.com/linuxserver/Heimdall.git
synced 2026-02-22 04:30:32 +09:00
added order saving, dragging and pinning
This commit is contained in:
13
app/Item.php
13
app/Item.php
@@ -11,7 +11,7 @@ class Item extends Model
|
||||
{
|
||||
//
|
||||
protected $fillable = [
|
||||
'title', 'url', 'colour', 'icon', 'description', 'pinned'
|
||||
'title', 'url', 'colour', 'icon', 'description', 'pinned', 'order'
|
||||
];
|
||||
|
||||
public static function supportedList()
|
||||
@@ -25,4 +25,15 @@ class Item extends Model
|
||||
{
|
||||
return array_keys(self::supportedList());
|
||||
}
|
||||
|
||||
/**
|
||||
* Scope a query to only include pinned items.
|
||||
*
|
||||
* @param \Illuminate\Database\Eloquent\Builder $query
|
||||
* @return \Illuminate\Database\Eloquent\Builder
|
||||
*/
|
||||
public function scopePinned($query)
|
||||
{
|
||||
return $query->where('pinned', 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user