Timeline for Passing $_POST from view to model in MVC
Current License: CC BY-SA 3.0
18 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 6, 2017 at 9:29 | comment | added | user3628807 | Yes this sounds great. I think I've seen it in codeigniter. | |
| Aug 4, 2017 at 20:42 | comment | added | N.B. |
Imagine if you had a class, let's name it Request, which you could use to obtain HTTP-request related values, be those values $_POST, $_GET, $_FILES,$_COOKIES, HTTP headers and what not.. would that not be awesome? Now imagine you could do request()->input('username'); from anywhere in your code. How great would that be? If you think something like that would be good, then it means I might have sparkled your imagination.
|
|
| S Aug 3, 2017 at 18:17 | history | suggested | DaAmidza | CC BY-SA 3.0 |
confusion with framework and regular project
|
| Aug 3, 2017 at 16:13 | review | Suggested edits | |||
| S Aug 3, 2017 at 18:17 | |||||
| Aug 3, 2017 at 16:05 | answer | added | DaAmidza | timeline score: 3 | |
| Aug 3, 2017 at 11:04 | comment | added | user3628807 | Yes, of course I will read it. I will appreciate your time :) | |
| Aug 3, 2017 at 9:29 | comment | added | DaAmidza | Also what i see you are abstracting pdo here, you are just limiting your code here.Also you use lots of statics where they are not needed.You are missing namespaces here also.The controllers have potential to be good. | |
| Aug 3, 2017 at 9:25 | comment | added | DaAmidza | Saw the code you posted on github, well you could benefit from a DiC and to use a mapper.I'l write it down if you will read it :D | |
| Aug 3, 2017 at 9:22 | comment | added | DaAmidza | Why are you passing the view(input) directly to the model?I'm new to the MVC structure, but thanks to some great people here on stack I'v managed to expand my knowledge in the right way.If you wan't il write down the way how i structured my project and what I'm using thought the project.I haven't seen your whole code but form what i see i think that you fell of the path a bit. | |
| Aug 3, 2017 at 2:10 | answer | added | I wrestled a bear once. | timeline score: 5 | |
| Aug 2, 2017 at 23:57 | comment | added | user3628807 | I uploaded it to github if you want to see the entire code. github.com/Rakamishu/MVC | |
| Aug 2, 2017 at 23:05 | comment | added | user3628807 | Of course, how else am I going to understand it? I just need to experiment more with the basic stuff - importing and exporting in and out of the database, etc.. This is why I am building a login system. | |
| Aug 2, 2017 at 22:45 | comment | added | I wrestled a bear once. | Is it really going to benefit you if I review and make suggestions on code you don't fully understand? You should seek to understand the code first. | |
| Aug 2, 2017 at 22:20 | comment | added | user3628807 | And it's really hard for me to explain what is happening because I saw it in a video tutorial and I don't fully understand it, but here is my controller user.php. My Controller class and my App.php. I think that is enough to get the gist of what is going on. | |
| Aug 2, 2017 at 22:10 | comment | added | I wrestled a bear once. | I would but I don't know how your users class is being called so I can't. Besides it's just a general rule of thumb. The general exception is if it's a controller class sometimes you can get away with it. You should consider doimg some input sanitation though. | |
| Aug 2, 2017 at 22:08 | comment | added | user3628807 | Could you give me an idea on how would I do this? | |
| Aug 2, 2017 at 22:03 | comment | added | I wrestled a bear once. | Please try to avoid using superglobals in your methods. Better to pass them in if possible. | |
| Aug 2, 2017 at 21:34 | history | asked | user3628807 | CC BY-SA 3.0 |