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 TravelRequest extends Model
{
use HasFactory;
use SoftDeletes;
use Searchable;
use LaratrustUserTrait;
protected $guarded = [];
public function toSearchableArray()
{
return [
'employee_id'=> $this->employee_id,
'req_id' => $this->req_id,
'travel_from' => $this->travel_from,
'travel_to' => $this->travel_to,
'from_location' => $this->from_location,
'to_location' => $this->to_location,
'travel_reason' => $this->travel_reason,
];
}
}