querying the database in laravel using sql commands code example
Example 1: db::statement in laravel
DB::statement('DROP TABLE users');
DB::statement('ALTER TABLE projects AUTO_INCREMENT=123');
Example 2: DB: in eloquent using sql
$results = DB::select('select * from users where id = :id', ['id' => 1]);