KingKongFrog
KingKongFrog

Reputation: 14429

Laravel - Eloquent ORM - existing database

I'm trying to learn about laravel / eloquent orm.

How does one implement an existing database/table with eloquent. Any examples out there? Everything out there shows how to create database/tables. I'd like to use existing data structure and implement classes.

Upvotes: 0

Views: 3619

Answers (1)

GWed
GWed

Reputation: 15673

Try reading the docs, creating tables is only handled by migrations. Eloquent can work with any pre existing schema

Pretty much top of the Laravel Eloquent page http://laravel.com/docs/4.2/eloquent#basic-usage

class User extends Eloquent {

    protected $table = 'my_users';

}

Upvotes: 2

Related Questions