I'm just starting to learn about Laravel and trying to migrate from CI. I have a few simple questions.
I guess number 1 and 2 questions are somehow related.
You can use fluent:
DB::table("...");
Eloquent, which is based on PDO is ORM and more abstracted from raw queries.
Eloquent is a great tool, so I recommend familiarizing yourself with it if you get the chance.
You can build queries on your own using Laravel's query builder.
Read up on it here, I hope this answers your question and sorry if I misunderstood!
http://laravel.com/docs/queries
Good luck!
I think you can`t create a model without extends eloquent
like laravel 4 Doc
class User extends Eloquent {}
because a model in laravel based into eloquent ORM
unlike CodeIgniter
If you need to deal with database tables with creating models ,you can use DB
class like laravel 4 Doc
DB::select('')
and DB::table('')
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.