M
M
Mo1she2018-08-09 09:57:34
Laravel
Mo1she, 2018-08-09 09:57:34

Comments for different entities in Laravel?

How to implement comments for different entities in Laravel? Let's say I want to have comments for different entities: portfolio, recipes, news, etc. How to properly establish links without losing the ability to use eager loading?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
Tesla, 2018-08-09
@Mo1she

https://laravel.com/docs/5.6/eloquent-relationship...

A
Anton Anton, 2018-08-09
@Fragster

It seems to me that a model factory would be optimal, otherwise it will not work to use foreign keys

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question