Let me just start off by saying I'm VERY new to Laravel. I have a table for listbox items (truncated migration code below):
$table->increments('id');
$table->string('list_item');
$table->string('group');
$table->integer('sort_order')->default(1);
Group is used for e.g "TITLE", "SPECIALITIES" etc. I'm linking user_title_li_id (in the users table) to the id of this table, as well as provider_title_li_id, provider_speciality_li_id in the providers table etc
How do I set up the relationship in the User and List Item models, in order to get the list_item (e.g. Professor) for each Model in the controller?
In your User model, define a function like this: