for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Builder;
/**
* App\Models\Sensor
*
*/
class Sensor extends Model
{
* Indicates if the model should be timestamped.
* @var bool
public $timestamps = false;
* The table associated with the model.
* @var string
protected $table = 'sensors';
* The primary key column name.
protected $primaryKey = 'sensors_id';
// ---- Define Reletionships ----
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
public function device()
return $this->belongsTo('App\Models\Device', 'device_id');
}