ReportDataUsoDelCasco.php 692 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Factories\HasFactory;
  4. use Illuminate\Database\Eloquent\Model;
  5. class ReportDataUsoDelCasco extends Model
  6. {
  7. use HasFactory;
  8. //protected $primaryKey = 'progressive';
  9. public $timestamps = false;
  10. protected $table = 'fcf_reports_report_data_uso_del_casco';
  11. protected $fillable = [
  12. 'report_id',
  13. 'progressive',
  14. 'conducente' ,
  15. 'passeggeri'
  16. ];
  17. public function report()
  18. {
  19. return $this->belongsTo(Report::class, 'report_id');
  20. }
  21. public function scopeByProgressive($query, $progressive)
  22. {
  23. return $query->where('progressive', $progressive);
  24. }
  25. }