Skip to content

Instantly share code, notes, and snippets.

@ChadTaljaardt
Created February 14, 2017 15:31
Show Gist options
  • Save ChadTaljaardt/8f001eb2a79758421da0fdcc379eaa8d to your computer and use it in GitHub Desktop.
Save ChadTaljaardt/8f001eb2a79758421da0fdcc379eaa8d to your computer and use it in GitHub Desktop.
<?php
namespace App\Models;
use App\Traits\UuidModel;
use Illuminate\Database\Eloquent\Model;
class Plate extends Model
{
use UuidModel;
public $incrementing = false;
protected $table = "plates";
protected $fillable = ['plate'];
protected $dates = ['created_at', 'updated_at'];
protected function detections()
{
return $this->belongsToMany('App\Models\Detections');
}
protected function users()
{
return $this->belongsToMany('App\Models\User');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment