app/Models/State.php
/**
     * Get the indexable data array for the model.
     *
     * @return array
     */
Get the indexable data array for the model.
@return array
Get the indexable data array for the model . @return array
public function toSearchableArray()
    {
        $array = $this->toArray();
        $array['country'] = $this->country->toArray();
        return $array;
    }
public function toSearchableArray ( ) { $ array = $ this -> toArray ( ) ; $ array [ 'country' ] = $ this -> country -> toArray ( ) ; return $ array ; }
Get the indexable data array for the model.
Get the indexable data array for the model .