ardent icon indicating copy to clipboard operation
ardent copied to clipboard

Extends Model but not Eloquent

Open Grey2k opened this issue 11 years ago • 5 comments

Eloquent class extends Model , and provided where() and find() static methods, for object queries, why Ardent not extending from it, but extending from Model?

This is by design? or i need to know some?

Grey2k avatar May 31 '14 08:05 Grey2k

Ok i found find() method, and where is where() method for query ??

Grey2k avatar May 31 '14 08:05 Grey2k

Check app/config/app.php in aliases. the shortened Eloquent class is \Illuminate\Database\Eloquent\Model by default.

impleri avatar Jun 02 '14 14:06 impleri

Ardent doesn't support protected $table = 'table1'; as it doesn't extend eloquent. Its giving me issues as it is not respecting the table property and is trying to store the model data in the wrong table.

casoetan avatar Jul 21 '14 07:07 casoetan

@casoetan It extends Illuminate\Database\Eloquent\Model which is aliased in Laravel by default to Eloquent, so it should certainly support Eloquent logic.

impleri avatar Jul 21 '14 22:07 impleri

@impleri please ignore [oversight] Thanks

casoetan avatar Jul 22 '14 11:07 casoetan