2017-02-13 12:08:16 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
class Group extends Model
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The attributes that are mass assignable.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $fillable = [
|
|
|
|
'name'
|
|
|
|
];
|
2017-02-15 09:14:52 +00:00
|
|
|
|
|
|
|
public function users()
|
|
|
|
{
|
|
|
|
return $this->belongsToMany(User::class, 'user_groups');
|
|
|
|
}
|
2017-02-13 12:08:16 +00:00
|
|
|
}
|