Note that there are some explanatory texts on larger screens.

plurals
  1. POFile Structure + Shared Features Between Controllers
    primarykey
    data
    text
    <p>So im stuck with a file structure problem, i'm trying to find the best way not to repeat things. Im trying to get features shared with each extra section (Music, Movies, Shows etc). The Features being Likes, Recommendations, Tags and List. I'm looking for advice on how to structure it so there will be minimal repeating of code and easy secure access to the features for each section. The details are below. Also I am using Fuel PHP framework: <a href="http://fuelphp.com/" rel="nofollow">http://fuelphp.com/</a></p> <p>There are listings: Music, Movies, Shows. (http://domain.com/music/view/1) Each listing supports Tags: (http://domain.com/music/tag/view/rock)</p> <p>So far that's easy, but features like 'likes' and 'recommendations' confuse me, as in I could have 'likes' in each listing's controller. Example (http://domain.com/music/like/1) or in its own controller (http://domain.com/like/music/1).</p> <p>Also each listing has 'recommendations' which list similar listings with reviews and 'Likes' for each recommendation. So 'likes' can be for listings and recommendations.</p> <p>Music (Model_Music)[one-to-one Model_List]</p> <p>-- Likes</p> <p>-- Tags (many-to-many)</p> <p>-- Recommendations (cross-reference by UNION)</p> <p>-- List (in this case all tracks and the song name) [one-to-many]</p> <p>Shows (Model_Shows)[one-to-one Model_List]</p> <p>-- Likes</p> <p>-- Tags (many-to-many)</p> <p>-- Recommendations (cross-reference by UNION)</p> <p>-- List (in this case all episode names and number)[one-to-many]</p> <p>As you can tell most of it will be the same code just with different URL structure and some changes on which table to use. I'm just not sure how to handle things best, just need a more experienced view on handling all these additional features to each listing music.php, shows.php, movies.php any any others that will be added.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload