update & delete

update with raw query

Route::get('update', function(){
	$update = DB::update('update posts set title ="Update tile" where id = ?',[1]);

	return $update;
});

mysql> select * from posts;
+—-+——————+———————————————-+————+————+———-+
| id | title | content | created_at | updated_at | is_admin |
+—-+——————+———————————————-+————+————+———-+
| 1 | Update tile | Laravel is the best thing that happen to PHP | NULL | NULL | 0 |
| 2 | php with laravel | Laravel is the best thing that happen to PHP | NULL | NULL | 0 |
+—-+——————+———————————————-+————+————+———-+
2 rows in set (0.00 sec)

Route::get('delete', function(){
	$delete = DB::delete('delete from posts where id = ?', [2]);
	return $delete;
});

mysql> select * from posts;
+—-+————-+———————————————-+————+————+———-+
| id | title | content | created_at | updated_at | is_admin |
+—-+————-+———————————————-+————+————+———-+
| 1 | Update tile | Laravel is the best thing that happen to PHP | NULL | NULL | 0 |
+—-+————-+———————————————-+————+————+———-+
1 row in set (0.00 sec)

absolutely I godit.