inital commit
This commit is contained in:
61
app/Models/ResearchDev.php
Normal file
61
app/Models/ResearchDev.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ResearchDev extends Model
|
||||
{
|
||||
|
||||
public static function boot()
|
||||
{
|
||||
parent::boot();
|
||||
|
||||
self::creating(function($model){
|
||||
});
|
||||
|
||||
self::created(function($model){
|
||||
auth()->user()->addActivityComplete(1056,$model);
|
||||
});
|
||||
|
||||
self::updating(function($model){
|
||||
auth()->user()->addActivityComplete(1057,$model);
|
||||
});
|
||||
|
||||
self::updated(function($model){
|
||||
});
|
||||
|
||||
self::deleting(function($model){
|
||||
auth()->user()->addActivityComplete(1058,$model);
|
||||
});
|
||||
|
||||
self::deleted(function($model){
|
||||
});
|
||||
}
|
||||
|
||||
protected $fillable = [
|
||||
'project_title',
|
||||
'province_id',
|
||||
'province_fa',
|
||||
'project_agent',
|
||||
'final_report_one',
|
||||
'final_report_two',
|
||||
'final_report_three',
|
||||
'final_report_four',
|
||||
'project_status',
|
||||
'contract_amount',
|
||||
'contract_date',
|
||||
'contract_number',
|
||||
'contract_term',
|
||||
'domain_fa',
|
||||
'contract_status',
|
||||
'uuid',
|
||||
'domain_id',
|
||||
'unique_id',
|
||||
];
|
||||
|
||||
public function province()
|
||||
{
|
||||
return $this->belongsTo(Province::class, 'province_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user