Group.php
Go to the documentation of this file.
1 <?php
2 namespace App\Models;
3 
5 
7 
8 class Group extends Model
9 {
10  protected $table = 'groups';
11 
12  public $rules = array(
13  'name' => 'required|min:3|max:255',
14  );
15 
23  protected $injectUniqueIdentifier = true;
24  use ValidatingTrait;
25 
26 
30  public function users()
31  {
32  return $this->belongsToMany('\App\Models\User', 'users_groups');
33  }
34 }
users()
Get user groups.
Definition: Group.php:30
$injectUniqueIdentifier
Definition: Group.php:23