CasperSecurity
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Laratrust\Traits\LaratrustUserTrait;
use Laravel\Scout\Searchable;
class SalaryJournalConfiguration extends Model
{
use HasFactory;
use SoftDeletes;
use Searchable;
use LaratrustUserTrait;
protected $guarded = [];
public function toSearchableArray()
{
return [
'description' => $this->description,
'type' => $this-> type,
'earning_deduction' => $this->earning_deduction,
'salary_loan' => $this->salary_loan,
];
}
public function getLedgerHead(){
return $this->belongsTo(LedgerHead::class,'ledger_head_id');
}
}