Is there a way to get all the attributes of an Eloquent Model? Here is the sample model:
class User extends Model{
public function posts(){
return $this->hasMany('App\EloquentModel\post');
}
public function type(){
return $this->hasOne('App\EloquentModel\type');
}
}
I want to get posts()
and type()
attribute , Thanks in advance