vendredi 22 juillet 2016

get the data from the resultant in laravel eloquent

I have these tables
categories_branch
categories
categories_branch_relation
locale

using categories_branch_relation table to get record it has both foreign keys. now problem is to pick the record from the categories table (lang_locale_text_id) from other table.

my query result is

[0] => Array
    (
        [id] => 1
        [category_id] => 1
        [category_branch_id] => 1
        [categorydata] => Array
            (
                [id] => 1
                [name] => Elektrotechnik
                [description] => Elektrotechnik
                [rating] => 0
                [datetime] => 2016-06-27 00:00:00
                [visible] => 1
                [lang_locale_text_id] => 4
            )

    )

how i can get data from (lang_locale_text_id) from other table ?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire