Sorry, there wasn't any repo for this course, as it was multiple small examples in this course so I didn't feel the need to save them as repository/repositories.
Yes I do provide the source code for courses that have one project created throughout the course. But not for courses where separate lessons are with small experiments like this one.
what about down in migration file ? how to drop it?
Personally, I don't use down() method for a long time, Taylor said it back in 2017: /post/still-need-migrations-taylor-says-no
Let's assume there is a PhotoController for polymorphic child resource
to manipulate Photo data.
Assuming Photo data is updated, then parent row,
either Project or Task, should be updated as well.
I see several options.
Option 1:
To create ProjectPhotoControler and TaskPhotoControler.
This way when inside ProjectPhotoControler,
is Project and may address Project fields by -> operator.
And same for Task.
In this case there is some code repetition,
yet dedicated controler may be more readable.
Option 2:
To create PhotoControler only,
yet will need if blocks to compare to photoable_type, like that
In this case, there is only one controler.
Yet, if there are more Owner Entities,
a lot of "if condition" blocks can make a code not readable.
Question: Can you please reccomend?
It's your personal preference, but I would go with PhotoController and if-else turned into match
Hi, could you please share the repository link for this course?
Sorry, there wasn't any repo for this course, as it was multiple small examples in this course so I didn't feel the need to save them as repository/repositories.
Okay thank for your response
can i receive source codes related to polymophic explanations ???
Sorry when shooting this course I didn't save the source into repository
nowaday, many lectures provide the source code. for example udemy... so i tald you
Yes I do provide the source code for courses that have one project created throughout the course. But not for courses where separate lessons are with small experiments like this one.