Answers for "laravel query builder and where"

PHP
2

laravel query builder select

use Illuminate\Support\Facades\DB;

$users = DB::table('users')
            ->select('name', 'email as user_email')
            ->get();
Posted by: Guest on August-14-2021
1

DB::table('users')->get();

$users = DB::table('users')->get();
Posted by: Guest on October-22-2020
1

DB::table('users')->get();

DB::select('SELECT * FROM users WHERE name = "'.Input::get('name').'"');
Posted by: Guest on October-22-2020
2

query builder laravel

use Illuminate\Database\Eloquent\Builder;

public function scopeFakePersons(Builder $query): Builder
{
  return $query->where('is_fake', 1);
}
Posted by: Guest on January-20-2021

Code answers related to "laravel query builder and where"

Browse Popular Code Answers by Language