Level 75
Try it with regex
$usres = User::where('storeName', 'LIKE', '%name%')
->whereRaw('storeFile REGEXP ^[0-9]+$')
->get();
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello ,
I have one laravel query in which I have to get those record , which column data have not any alphabetic
$getData = User::where('storeName', 'LIKE', '%name%')
->where('storeFile', 'LIKE', ???)
->get();
Here, 'storeFile' column have data which contain numeric as well as alphabetic. I want those record which have not contain alphabetic .
For example :
Then query should return 2 records (2,3).
Please or to participate in this conversation.