query eloquent like code example
Example 1: laravel where like
$users = DB::table('users')
->where('name', 'like', 'T%')
->get();
Example 2: laravel wherein like
$admin_permissions = Permission::all();
// Teacher Role
$teacher_permissions = $admin_permissions->filter(function ($permission) {
return substr($permission->title, 0, 8) == 'teacher_';
});