you can use DB::raw
method for this:
User::where(DB::raw("substr('name', 1, strpos('name', '_'))"), '=', 'kelvin');
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community