mercredi 16 juin 2021

any method to check full string in laravel

I use first() to check word exist or not in db. but it only checking first word like "puma" in string "puma run". i want to check full string like "puma run". is there any method to do this?

  $brand = Brand::query()->where('slug',$brandName)->first();
    if($brand){
        return $brand->id;
    }

where 'slug' is db column



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire