for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the HRis Software package.
*
* HRis - Human Resource and Payroll System
* @link http://github.com/HB-Co/HRis
*/
namespace HRis\Api\Eloquent;
use Illuminate\Database\Eloquent\Model;
* Class CustomField.
class CustomField extends Model
{
* Indicates if the model should be timestamped.
* @var bool
public $timestamps = false;
* The attributes that are mass assignable.
* @var array
protected $fillable = ['custom_field_section_id', 'name', 'custom_field_type_id', 'required', 'mask'];
* The database table used by the model.
* @var string
protected $table = 'custom_fields';
* @return \Illuminate\Database\Eloquent\Relations\HasOne
* @author Bertrand Kintanar <[email protected]>
public function type()
return $this->hasOne(CustomFieldType::class, 'id', 'custom_field_type_id');
}
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
public function section()
return $this->belongsTo(CustomFieldSection::class);
* @return \Illuminate\Database\Eloquent\Relations\HasMany
public function options()
return $this->hasMany(CustomFieldOption::class, 'custom_field_id', 'id');