Skip to main content

All Questions

Tagged with
1 vote
1 answer
334 views

Index.php automatic router for custom MVC

In house we have been building our own MVC framework. One of the things that was important in the project was to not have to add routes manually but instead have a standard and let the index ...
Joséph Flames's user avatar
2 votes
1 answer
314 views

PHP OOP: Configuring MySQL DB & query w/ Twig

I decided to up my PHP game and learn some OOP. I am re-building my website from procedural to OOP, but since I don't want to use a full framework I fiddle with some components. As a router I use ...
bender's user avatar
  • 21
2 votes
2 answers
239 views

'Lean controller'/'Business logic on service' and filtering, sorting, pagination methods on controllers

I'm currently reading about "Lean controllers"/"Business logic on services" and trying to refactor some legacy code. However I am struggling to apply what is taught in the ...
Marco Aurelio's user avatar
3 votes
2 answers
209 views

Router and solid principle

I would like to know if my Routing system respects the solid principle ? The system is simple, Router class contains the routes and returns the correct route and Route class represents a route, ...
user avatar
1 vote
2 answers
392 views

Implementing Pagination with Twig in Codeigniter 3

I am working on a online newspaper/blogging application with CodeIgniter 3.1.8 and Bootstrap 4. I have decided to add themes to it. The application is not HMVC, only MVC. I thought it was a good idea ...
Razvan Zamfir's user avatar
-1 votes
1 answer
116 views

PHP template MVC [closed]

For several days I have been learning about MVC, and I do some code but I don't know if that is correct. I will be grateful for some tips to get this code better. Here is my github respository https://...
MaksStonka's user avatar
1 vote
2 answers
174 views

PHP - How can I refactor this store function (which handles different database operation for user types) in order to reduce duplication?

I'm simply using Slim PHP MVC framework in my API project. PDO::FETCH_ASSOC is used in the database calls. So no data objects. The router handles requests and pass to the controller. controller calls ...
camille's user avatar
  • 147
1 vote
1 answer
187 views

Is this an good OOP Design in MVC PHP for getting User Details?

I was given a API project by my co-worker to work on half created a system in slim PHP. The project consists of the Models and controllers. When the route is called it calls the Controller with the ...
camille's user avatar
  • 147
5 votes
1 answer
3k views

PHP OOP MVC structure

I am quite new to the MVC concept. I already know how to program object-orientated from other languages like C++ or Java. I have implemented a little login system for test purpose. I am not sure if my ...
Chryfi's user avatar
  • 196
3 votes
2 answers
142 views

PHP Edit Volunteer Group Form

I have a PHP CodeIgniter website that collects volunteer registrations. One thing I have noticed is that the controllers are getting really big. The controllers have many methods, and each method is ...
RedDragonWebDesign's user avatar
1 vote
2 answers
263 views

Improving upon basic MVC in PHP

I've put together a simple CRUD application to keep track of my library of books in an effort to learn the model-view-controller pattern, as well as better myself at PHP. Everything I have works so ...
Robert Holman's user avatar
0 votes
3 answers
573 views

Filtering data from MYSQL database based on parameters passed with POST request

I am working on a PHP MVC project for my portfolio. Its an web app where you can store contacts (email and phone number). I am having trouble with filtering contacts based on filter form that has 3 ...
Smiley-dev's user avatar
0 votes
1 answer
68 views

Improving PHP MVC code for personal website [closed]

Github for project: https://github.com/wrpd/portfolio I have a very general understanding of MVC but haven't ever implemented it. In an effort to improve my understanding and get back into a little ...
usulmuaddib's user avatar
4 votes
1 answer
352 views

Codeigniter 3 micro-blogging application

I am working on a basic blog application in Codeigniter 3.1.8 and Bootstrap 4. The application allows Registration (as an author), Login, adding Categories and Posts. I have created an installation ...
Razvan Zamfir's user avatar
3 votes
1 answer
4k views

PHP MVC render view method

I am working on creating a simple MVC inspired framework (for learning purposes and because i don't want to use a pre-existing framework at the moment). I have the system already set up and its ...
K.D's user avatar
  • 133

15 30 50 per page
1
2 3 4 5
14