Skip to content

Arraization(?) is turning my Eloquent collections into strings (not arrays) #43

@martynbiz

Description

@martynbiz

I'm passing in Eloquent Collections like so:

$engine->render('index/index', [
    'questions' => $questions,
);

If I var_export in the my controller class, the variable is set as an instance of Collection, but if I var_export within the template it's not an object, it's not an array even, but is a json_encoded string! I guess I could json_decode but is this the desired behaviour?

Also, how do I turn off Arraization for all templates? I might not wish to have this feature for now. Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions