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

31 lines
649 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 = ['created_at','updated_at'];
public static function byEvent($event){
return DB::table('users')->join('events', 'users.eid', '=', 'events.eid')->get();
}
}