Similar Posts

42 thoughts on “Use PHP to Create an MVC Framework – Full Course
  1. If you have this error:

    Deprecated: call_user_func() expects parameter 1 to be a valid callback, non-static method appcontrollersSiteController::handleContact() should not be called statically in /Applications/MAMP/htdocs/MVC/core/Router.php

    in 1:04:00

    just add static to to handleContact()

    namespace appcontrollers;

    class SiteController
    static public function handleContact()
    return "handle the contact";

  2. i'm new in php, i just made mike's tutorial, now i'm at 2 hour of this tutorial, it is awesome what i has been learn with this, it take me 3 days to watch this 2 hours but it's totally worth

  3. Solution to " Uncaught TypeError: call_user_func(): Argument #1 ($callback) must be a valid callback, non-static method appcontrollersSiteController::contact() cannot be called statically" error during the implementation of the controller
    hello, i'm using php 8.x, i solved this problem making static every function in SiteController (where i had to use SiteController), based on the documentation in the version 8.x the operator :: is used for static functions, i also had to use use appcoreApplication in the SiteController to include Application in SiteController. I write down this here just in the case other one had the same problem. (sorry for my english, I'm not a native speaker)

  4. Thank you so much for this video and I have learnt a lot from this video.. could you please tell me how to host this project in a dedicated server please?

  5. Thank you so much for this tutorial it is really awesome.
    If possible could you answer this question?
    How did you learn all of this, is it over the years or is there some kind of documentation that you used.
    And how would you advise people when trying to improve their php knowledge

  6. 1:57:44 this wouldnt work in php 8 with strict types on since str_replace expects a string|array and not an integer at the second parameter. An easy Fix would be to cast the value into a string with the php built in function strval()"

  7. Hi! I'm following your tutorial and got this error in 1:03:47

    Fatal error: Uncaught TypeError: call_user_func(): Argument #1 ($callback) must be a valid callback, non-static method appcontrollersSiteController::handleContact() cannot be called statically in E:xampphtdocsphp_frameworkcoreRouter.php: 46 Stack trace: #0 E:xampphtdocsphp_frameworkcoreRouter.php(46): call_user_func(Array) #1 E:xampphtdocsphp_frameworkcoreApplication.php(25): appcoreRouter->resolve() #2 E:xampphtdocsphp_frameworkpublicindex.php(14): appcoreApplication->run() #3 {main} thrown in E:xampphtdocsphp_frameworkcoreRouter.php on line 46

  8. Thanks a lot for this very good video !
    I learned a lot during this course, I already worked with Symfony and it allowed me to have a better understanding behind those frameworks !
    Keep up the good work 😉💪

  9. This is superb. Fast paced & does exactly what it says on the tin. Thank you very much for creating and sharing this for free, it is absolutely invaluable and you are very generous!

Leave a Reply

Your email address will not be published. Required fields are marked *