added sender ID to the clients Tab in Show view plus bug fixes
This commit is contained in:
@@ -3,19 +3,35 @@
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Spatie\Activitylog\Traits\LogsActivity;
|
||||
use Spatie\Activitylog\LogOptions;
|
||||
|
||||
class SenderId extends Model{
|
||||
use LogsActivity;
|
||||
|
||||
|
||||
protected $guarded = array('id');
|
||||
public $table = "sender_ids";
|
||||
protected static $logName = 'senderid_log';
|
||||
// protected static $causedBy = $user_model;
|
||||
protected static $logOnlyDirty = true;
|
||||
protected static $dontSubmitEmptyLogs = true;
|
||||
|
||||
|
||||
protected static $logUnguarded = true;
|
||||
public function getActivitylogOptions(): LogOptions{
|
||||
return LogOptions::defaults()
|
||||
->logUnguarded()->useLogName('senderid_log')->logOnlyDirty()->dontSubmitEmptyLogs();
|
||||
}
|
||||
|
||||
|
||||
public function modified_by_info(){
|
||||
return $this->hasOne('App\Models\StaffMember', 'id', 'last_modified_by');
|
||||
}
|
||||
public function network_info(){
|
||||
return $this->hasOne('App\Models\NetworkOps', 'id', 'netowkr_id');
|
||||
return $this->hasOne('App\Models\NetworkOps', 'id', 'network_id');
|
||||
}
|
||||
public function created_by_info(){
|
||||
return $this->hasOne('App\Models\StaffMember', 'id', 'created_by');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user