samedi 12 mars 2016

Retrieved data formating in laravel

I am new in laravel. I am familiar with CI and CakePHP but new in laravel. After reading about laravel on internet i installed laravel and retrieve data from database, but i dont understand the retrieved object, what is this. Please help me to understand it.

App\Models\Question Object
(
    [primaryKey:protected] => id
    [fillable:protected] => Array
        (
            [0] => name
            [1] => email
            [2] => password
        )

    [hidden:protected] => Array
        (
            [0] => password
            [1] => remember_token
        )

    [connection:protected] => 
    [table:protected] => 
    [perPage:protected] => 15
    [incrementing] => 1
    [timestamps] => 1
    [attributes:protected] => Array
        (
            [id] => 1
            [t_num] => aP5z78e
            [university] => 5
            [course] => 1
            [branch] => 0
            [subject] => 6
            [type] => 1
            [year] => 2007,2011
            [session] => 
            [question] => State and explain Thevenin's therom with example.
            [paper_code] => 
            [marks] => 
            [slug] => state-and-explain-thevenins-therom-with-example
            [additional_info] => 
            [option_1] => 
            [option_2] => 
            [option_3] => 
            [option_4] => 
            [answer] => 
            [status] => 1
            [user_id] => 1
            [created] => 1439622767
            [modified] => 1439622767
        )

    [original:protected] => Array
        (
            [id] => 1
            [t_num] => aP5z78e
            [university] => 5
            [course] => 1
            [branch] => 0
            [subject] => 6
            [type] => 1
            [year] => 2007,2011
            [session] => 
            [question] => State and explain 
            [paper_code] => 
            [marks] => 
            [slug] => state-and-explain
            [additional_info] => 
            [option_1] => 
            [option_2] => 
            [option_3] => 
            [option_4] => 
            [answer] => 
            [status] => 1
            [user_id] => 1
            [created] => 1439622767
            [modified] => 1439622767
        )

    [relations:protected] => Array
        (
        )

    [visible:protected] => Array
        (
        )

    [appends:protected] => Array
        (
        )

    [guarded:protected] => Array
        (
            [0] => *
        )

    [dates:protected] => Array
        (
        )

    [dateFormat:protected] => 
    [casts:protected] => Array
        (
        )

    [touches:protected] => Array
        (
        )

    [observables:protected] => Array
        (
        )

    [with:protected] => Array
        (
        )

    [morphClass:protected] => 
    [exists] => 1
    [wasRecentlyCreated] => 
)

And after relation with other models, its hanged.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire