hi im with laravel 5.1
im trying to fetch data from table. categorys and products
categorys has following coloumns
cat_name
cat_description
cat_price
products has following coloumns
product_name
product_description
category //stores category id
product_price
in index.blade.php of product page. i want to dispaly content as follows
*product name product description category price*
casio watch an anolog watch clock 33$
Flash light LED Flah light lights 42$
please help me in doing these. thank you
i am not doing the work/homework for you.. its a join/related query.. try it in the MySQL console and then go from there, if you get stuck on the query then post the query here..
or alternatively use relationship aspect of laravel to link categories/products and then construct a proper eloquent query using with() construct.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community