Advertisement
Guest User

User

a guest
Apr 22nd, 2018
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.48 KB | None | 0 0
  1. <?php
  2.  
  3. namespace App\Models;
  4.  
  5. use Illuminate\Notifications\Notifiable;
  6. use Illuminate\Foundation\Auth\User as Authenticatable;
  7.  
  8. class User extends Authenticatable
  9. {
  10.     use Notifiable;
  11.  
  12.     protected $guarded  = ['user'];
  13.  
  14.     protected $fillable = [
  15.         'name', 'email', 'password',
  16.     ];
  17.  
  18.     protected $hidden = [
  19.         'password', 'remember_token',
  20.     ];
  21.  
  22.     public function companies()
  23.     {
  24.         return $this->belongsToMany(Company::class);
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement