I would like to fetch record that a columun has specfic strings. My Laravel framework is 5.7.28
Here is my DB. Take a look 'image' columun.
For example. I would like to fetch record that 'images' name include '01' strings. I give name all image data those front 2 letters are numbers such as '01', '02', '03' ....
Could you please teach me how to write controller code?
Here is my current controller
public function index2()
{
$images = ImageGallery::orderBy(DB::raw('LENGTH(image), image'))->paginate(10);
return view('image-gallery2',compact('images'));
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire