I hereby claim:
- I am muarachmann on github.
- I am muarachmann (https://keybase.io/muarachmann) on keybase.
- I have a public key ASCCxmtCXcj6R1edR6Az30FucETliNBQHYNvVBQjVh9n5go
To claim this, I am signing this object:
Before diviing into the hassle of creating this post, I had one big concern dealing with tons of telephone data (numbers), I had to filter these based on Cameroonian network operators (MTN, ORANGE, CAMTEL & NEXTTEL). While this was an easy thing to do with the `'LIKE'` functionality of mysql. However, I didn't like my solution as shown below. | |
```php | |
// scope for network operators | |
public function scopeNetworkOperator($query, string $operator = null) | |
{ | |
switch ($operator) { | |
case "mtn": | |
return $query->where('phone', 'like', '67%') | |
->orWhere('phone', 'like', '650%') |
I hereby claim:
To claim this, I am signing this object: