c3lf-system-3/app/Item.php
2019-12-01 18:30:25 +01:00

31 lines
624 B
PHP

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Item extends Model
{
use SoftDeletes;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'iid', 'item_uid', 'bezeichnung', 'wann', 'wo', 'eid', 'cid'
];
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
protected $hidden = [];
public static function byEvent($event){
return DB::table('users')->join('events', 'users.eid', '=', 'events.eid')->get();
}
}