geekshubh
65
14
Vue

Retrieve username based on id in users table

Posted 5 months ago by geekshubh

I have two tables, one is "classroom" and other is "users" The classroom table has following field:- 'teacher_id(foreign key from 'id')' which contains a json encoded list of id from "users" table "id" column meaning there can be multiple teachers for same classroom. Now the question is that how do I retrieve the names of the teachers based on their teacher_id/id from users table and show them in a table on the main page.Want to make this work using vue component in a table format. Please help I am a newbie.

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up

Channels

Reply to

Use Markdown with GitHub-flavored code blocks.