ok

Mini Shell

Direktori : /home2/selectio/public_html/fms-worksuite/app/Traits/
Upload File :
Current File : /home2/selectio/public_html/fms-worksuite/app/Traits/UniversalSearchTrait.php

<?php

namespace App\Traits;

use App\Models\UniversalSearch;

trait UniversalSearchTrait
{

    /**
     * @param int $searchableId
     * @param string $title
     * @param string $route
     * @param string $type
     * @throws \Froiden\RestAPI\Exceptions\RelatedResourceNotFoundException
     */
    public function logSearchEntry($searchableId, $title, $route, $type, $company_id = null)
    {
        $search = new UniversalSearch();
        $search->company_id = $company_id;
        $search->searchable_id = $searchableId;
        $search->title = $title;
        $search->route_name = $route;
        $search->module_type = $type;
        $search->save();
    }

}

Zerion Mini Shell 1.0