http://four.laravel.com/docs/queries
主要是简化操作。
如
DB::from('user')->limit(1)->one();
DB::from('user')->limit(1)->all();
DB::createTable();
http://four.laravel.com/docs/queries
主要是简化操作。
如
DB::from('user')->limit(1)->one();
DB::from('user')->limit(1)->all();
DB::createTable();
Proposed lacks IDE support and is no better than the current
User::find(1);
User::find()->limit(10)->all();
ORM is good code.like you write.
but DAO also
\Yii::$app->db->createCommand()->queryRow();
is it can be add DB.php then code like
DB:from('users')->where(array('id'=>1))->order('id','desc')->one();
OR ->all();
some code like this.
just think.lol
maybe looks better.
and also support master/slaver