camihlst's avatar

Simple CMS for simple website

Hi there,

I have created a website with Laravel and integrated the auth login system. The website is www.prettyfit.dk I now want to make a simple CMS to make the client able to change some text and images throughout the website. I just need the first push in the right direction, as I know that my question is at the beginning stages of the CMS. I have recently done a Laravel blog tutorial and I know how the controller and CRUD work. Would I be able to use one controller for images and then have the front-page-image be ID no. 1 in the database and then make an image upload to change an images of the chosen ID? And then do the same for the text bits? There isnt much content on the page, so one controller per page/item seems like too much. Or am I on a wrong path here?

Thanks in advance, Camilla

0 likes
1 reply
lostideaslab's avatar

Hi,

There is nothing wrong or right, because it all depends on what is the task, what are the objectives and etc, so where to store images, whether to store images, how to link to images you stored are all questions that depends on what you are developing and yes, there are practices that most CMS-s follow, so someone could eventually tell you "oh, what you are doing is not following the traditional practice, so it is wrong" but that's meaningless, if your goal has nothing to do with following the tradition of CMS conventions.

Here is what you can think about: do you get the result you expected? Well done, set yourself a next step goal and getting done.

If you completed lots of these tiny goals then you can throw a party and celebrate your completion of a milestone in your path of learning Laravel or learning php programing or whatever your goal is ...

But back to the question about CMS, so here is what I'm doing, I developed this package and now it is published since few days, you can try it ... what it does that is useful for YOU, is that it gives you form and all other components that you need to create a blog post, or an article or whatever kind of content you wish to make but it has very complex architect behind the scene, for example as of your question, there are multiple options to store images and retrieve them in this package, the way we recommend is to upload them to the directory with the id of your post. But we have a lot of built-in options available, not to mention you can develop your own configuration about where to store images and how to retrieve them.

At the end, just like life, there is no ultimate answer to "right or wrong" of how to do something, how to do something depends on lots of factors, and as a rule of thumb the best way of doing something is the way that you feel most confident about it, being it because you find everyone else is doing it that way, or being it because it does the job and it is simple, or being it because it is written so in Bible and you are obsessed with bible ...

You wanted to get an image, you got your image, great job!

By the way, watch the full Laracasts from scratch series to get an idea of what is possible in Laravel,

By the way, if you have free time and wish to solve a problem with your skills but you don't exactly no what the problem should be and what is the desired solution "like, one controller for image or two controllers for image or whatever", maybe you can do some of tiny tasks I have on packages I'm working on and then see what other problems you find investing to solve, or what other teams or organizations you be interested to work with and so leave us ...

PS. Link to package: http://lostideaslab.com/pirates-lost-pearl/interactive-books-atelier/ Link to Laracasts series: https://laracasts.com/series/laravel-from-scratch-2017

Please or to participate in this conversation.