public function findByUrl($url, $type)
    {
        $item = $this->model->where('entity_type', $type)->where('entity_data', 'LIKE', '%"url":"'.$url.'"%')->first();

        if ($item && ($item->data->is_published == 1 || $item->data->is_published == 'on') && $item->data->published_at <= Carbon::now(config('app.timezone'))->format('Y-m-d H:i:s')) {
            return $item->data;
        }

        return null;
    }
public function findByUrl($url, $type)
    {
        $item = $this->model->where('entity_type', $type)->where('entity_data', 'LIKE', '%"url":"'.$url.'"%')->first();

        if ($item && ($item->data->is_published == 1 || $item->data->is_published == 'on') && $item->data->published_at <= Carbon::now(config('app.timezone'))->format('Y-m-d H:i:s')) {
            return $item->data;
        }

        return null;
    }
public function findByUrl ( $ url , $ type ) { $ item = $ this -> model -> where ( 'entity_type' , $ type ) -> where ( 'entity_data' , 'LIKE' , '%"url":"' . $ url . '"%' ) -> first ( ) ; if ( $ item && ( $ item -> data -> is_published == 1 || $ item -> data -> is_published == 'on' ) && $ item -> data -> published_at <= Carbon :: now ( config ( 'app.timezone' ) ) -> format ( 'Y-m-d H:i:s' ) ) { return $ item -> data ; } return null ; }
Find by URL

@param  string $url
@param  string $type

@return Object|null
Find by URL