Merhaba konuyu biraz hortlatmış gibi olucam ama sineId bey son verdiğiniz kodu şu şekilde uyarladım
public static function related($limit,$newsId)
{
$news = News::where('id','=',$newsId)->first();
return DB::table('news')->selectRaw('*,category.name category_name, news.title news_title, news.id news_id, news.slug news_slug, news.hit news_hit, category.created_at category_created_at, news.created_at news_created_at')
->join('newspic', 'news.id', '=', 'newspic.news_id')
->join('dosyalar', 'newspic.pic_id', '=', 'dosyalar.id')
->join('category', 'category.id', '=', 'news.category_id')
->where('newspic.cover', '!=','null')
->where(function($news) use ($news)
{
$news->whereRaw('*', 'like', '%'.explode(",",$news->tags).'%');
})
->where('news.id', '!=', $newsId)
->orderBy('news.id','desc')
->limit($limit)
->get();
}
Array to string conversion hatası alıyorum bu durumu nasıl çözebilirim ?