how can we check in the table in comma separated values in laravel

Solutions on MaxInterview for how can we check in the table in comma separated values in laravel by the best coders in the world

showing results for - "how can we check in the table in comma separated values in laravel"
Filippo
17 Feb 2019
1$search = 1;
2$data = \DB::table("myposts")
3    ->select("myposts.*")
4    ->whereRaw("find_in_set('".$search."',myposts.tags)")
5    ->get();