mercredi 26 avril 2017

Laravel 5.4 relationship 2 tables 3 id

i work with laravel 5.4, and i want receive informations from my relations tables.

I have 3 tables in phpmyadmin

ATHLETES

  • ID
  • FIRST_NAME
  • LAST_NAME

TYPES

  • ID
  • NAME
  • SLUG

ATHLETES_TYPES

  • ID
  • TYPE_ID
  • ATHLETE_ID

I have 3 models

ATHLETE

TYPE

ATHLETEBYTYPE

How i need make the relations models for have name and slug from my table TYPES, with my id from my table athletes?

Thank you



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2p3V3dq
via IFTTT

Aucun commentaire:

Enregistrer un commentaire