mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 02:39:10 -04:00
ALPHA 3.0.4
This commit is contained in:
12
app/Item.php
12
app/Item.php
@@ -6,5 +6,15 @@ use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Item extends Model
|
||||
{
|
||||
//
|
||||
public static function explodeItems($items)
|
||||
{
|
||||
$array_items = explode("-",$items);
|
||||
$col_items = collect();
|
||||
|
||||
foreach ($array_items as $item) {
|
||||
$col_items->push(Item::find($item));
|
||||
}
|
||||
$col_items->forget(0);
|
||||
return $col_items;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user