1
我想寫一個查詢,返回不同鏈接的計數。不過,我不斷獲取Laravel 5.3不同的方法不存在
方法不同的是不存在
這裏是我的代碼
$sample = Sample::all();
$uniqueResumes = $sample->distinct()->select('link')->count();
我想寫一個查詢,返回不同鏈接的計數。不過,我不斷獲取Laravel 5.3不同的方法不存在
方法不同的是不存在
這裏是我的代碼
$sample = Sample::all();
$uniqueResumes = $sample->distinct()->select('link')->count();
請試試這個:
$uniqueResumes = Sample::select('link')->distinct()->count();