Created
February 14, 2017 15:30
-
-
Save ChadTaljaardt/8f35fbfb5a7b02b5cbcc8faeddae1cf6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Models; | |
use App\Traits\UuidModel; | |
use Illuminate\Notifications\Notifiable; | |
use Illuminate\Foundation\Auth\User as Authenticatable; | |
class User extends Authenticatable | |
{ | |
use Notifiable, UuidModel; | |
public $incrementing = false; | |
protected $fillable = [ | |
'name', 'email', 'password', | |
]; | |
protected $hidden = [ | |
'password', 'remember_token', | |
]; | |
protected function detections() | |
{ | |
return $this->hasMany('App\Models\Detection', 'user_id', 'id'); | |
} | |
protected function plates() | |
{ | |
return $this->belongsToMany('App\Models\Plate', 'detections'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment