Тёмный

PHP MVC Framework from scratch | Source code included | Quick programming tutorial 

Quick Programming
Подписаться 37 тыс.
Просмотров 92 тыс.
50% 1

Опубликовано:

 

21 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 291   
@faisalasif5986
@faisalasif5986 Год назад
This course is competing all paid courses .. i am happy to find you in mybest youtube tutor. Love you.
@QuickProgramming
@QuickProgramming Год назад
Wow, thanks :)) am happy to hear it
@HolisticFX-f2z
@HolisticFX-f2z 4 месяца назад
​@@QuickProgramming I completely agree also. but if you get chance to comment on my post that would be greatly appreciated.
@shaikhanuman8012
@shaikhanuman8012 Год назад
PHP MVC best course, clear explanation on how MVC pattern works.
@QuickProgramming
@QuickProgramming Год назад
Awesome, thanks for the feedback 😊
@basilistigris640
@basilistigris640 Год назад
thank you Quick Programing for php mvc from scratch videos is the best to learn php javascript and web development! Great teacher explaining all functionalities and provide the code of the lesson!
@QuickProgramming
@QuickProgramming Год назад
thank you :)
@Wongmc644
@Wongmc644 Год назад
Watched 15 min and the explanations n flow is superb. Just great tutorial! Thanks
@user-rx8lz6yz4f
@user-rx8lz6yz4f Месяц назад
This is really great explaining and demonstrating. I understand much better how the models and queries are wired up now in an MVC / ORM. Really appreciate the work you put in to this.
@jhalmu
@jhalmu Год назад
Please people do not use this in World Wide Web before you know how to encrypt yor password. NO unencrypted passwords to database. Author should remember to say that to you. Be safe. Very nice tutorial, learned much.
@enriquesalomon8197
@enriquesalomon8197 7 месяцев назад
SALUTE to this , best tutorial I've ever seen in all PHP tutorial. well explain.
@QuickProgramming
@QuickProgramming 7 месяцев назад
Thank you, I appreciate your compliment and feedback 😊
@DR9Productions
@DR9Productions 5 месяцев назад
Fantastic tutorial! If someone wants to learn mvc, i recomend to start from this video! Very well explained!!! Well done to the author!!!
@QuickProgramming
@QuickProgramming 5 месяцев назад
Thanks so much. I really appreciate your recommendation 😊
@DR9Productions
@DR9Productions 5 месяцев назад
@@QuickProgramming keep doing what you doing! Thank you so much for sharing your knowledge with us! Cant wait to see more tutorials from you!!!
@premruetaiseeplak1758
@premruetaiseeplak1758 11 месяцев назад
This is from scratch that I looking for! thank you very much.
@QuickProgramming
@QuickProgramming 11 месяцев назад
You're most welcome 😊
@gru8299
@gru8299 Год назад
Thank you very much for the lesson! Surprisingly, after watching a couple of videos on the same topic in my native language, I understood more from you! Watching and delving into the subtitles.
@QuickProgramming
@QuickProgramming Год назад
Am very happy to hear it and thanks for leaving some feedback😊
@janedawg09
@janedawg09 8 месяцев назад
great content. you're teaching's really good. appreciate the zoom in/out, makes it easy to follow along and copy the codes afterwards. wanted to finish this in one go but got stuck for 2 days due to my assets files not being read. in case anyone come across the same problem where they can't load css/images/js just add the line before the last line in htaccess shown in the video: RewriteCond %{REQUEST_URI} !\.(css|jpg|jpeg|png|gif|ico)$ [NC]
@QuickProgramming
@QuickProgramming 8 месяцев назад
Youre most welcome and thanks for that HTACCESS tip, i'll test it out as well :)
@melvinreano1221
@melvinreano1221 10 месяцев назад
Great video!! it helps alot specially those aspirant PHP devs
@muhammadnaveed7953
@muhammadnaveed7953 Год назад
Awesome job. Thank you bro. You are putting quality content on this channel.
@QuickProgramming
@QuickProgramming Год назад
Thanks, I appreciate it!
@avan4197
@avan4197 2 месяца назад
Hi. This is a wonderful tutorial. If instead of writing all the PHP code at once, it would be great if HTML was developed along with it. Like if after creating the MVC structure, it was started from the HTML home page and all the changes related to login (necessary PHP on this page) were made. And then if any changes were required on the login html page they would be done there. And then the PHP code that needed to be written would be written by connecting the logging or home controller to it. And then gradually the complex code would be added, sequentially. Namespaces, triators and extra functionalities, such as validation rules, requests, posts etc, make this tutorial complex. It is quite difficult for beginners but probably intermediate learners will also find it difficult.
@shubh-kr
@shubh-kr Год назад
It's very good and clearly explained. It's great for any php/MVC novice. Great job.
@QuickProgramming
@QuickProgramming Год назад
Thank you very much!
@shubh-kr
@shubh-kr Год назад
@@QuickProgramming Wait and in some time you'll be another freeCodeCamp specific to PHP :) PHP will thank you.
@QuickProgramming
@QuickProgramming Год назад
@@shubh-kr thank you, i really appreciate the vote of confidence🙂
@maniaku06
@maniaku06 Год назад
You are the best teacher i ever meet!
@neilmckenna1742
@neilmckenna1742 4 месяца назад
Awesome Tutorial, definitely helped me understand PHP MVC.
@QuickProgramming
@QuickProgramming 4 месяца назад
Thats awesome to hear
@serversus17
@serversus17 Год назад
I implemented a router for the framework by modifying the app class and creating a router.php file. This was done because the app I am developing was becoming complex. I’d like to share my implementation and I hope you’ll do a tutorial for that soon. Keep up the good work 🎉
@QuickProgramming
@QuickProgramming Год назад
its good you're able to come up with your own implementation, that means you're actually learning and improving. There are many ways to implement the router so as long as it works as you need it, that awesome!
@portaldocodigo
@portaldocodigo Год назад
I'm waiting for your sharing, it could be very important for me.
@MewtwoStar
@MewtwoStar 4 месяца назад
@@QuickProgramming can you add router to this MVC framework, it will be very helpful for all type of projects. thank you.
@DanielMontezima
@DanielMontezima Год назад
Thank you for this tutorial. Amazing! I liked, commented and subscribed!
@QuickProgramming
@QuickProgramming Год назад
Thanks for taking time to leave some feedback and also subscribing😊
@jasonwilliams199
@jasonwilliams199 9 месяцев назад
Great work. This OOP construct is awesome. I'll be watching your series on php photo gallery website next to learn how to implement the MVC Framework into a bigger project.
@Im.ManjeetSingh5
@Im.ManjeetSingh5 Год назад
Watched other youtbers video but your videos are well explained and understandable for me. Keep up the good work❤
@QuickProgramming
@QuickProgramming Год назад
Thanks a lot for the feedback😊
@AsmaKhan-qf6gd
@AsmaKhan-qf6gd Год назад
well I love your way of teaching and I Got it 100% thank you so muchhhhhhhhhh
@benkleph
@benkleph Год назад
this is awesome. have learnt a lot from your tuts
@QuickProgramming
@QuickProgramming Год назад
Great to hear!
@maniaku06
@maniaku06 Год назад
thank you and good luck with your projects!
@cesaresqueda3108
@cesaresqueda3108 Год назад
maravilloso aporte gracias, saludos desde venezuela...
@QuickProgramming
@QuickProgramming Год назад
Thank you, greetings to you too :)
@majidsamir7657
@majidsamir7657 Год назад
Your teachings are so great thank you very much , Keep going you are the best
@QuickProgramming
@QuickProgramming Год назад
Thanks, i appreciate
@CountryVlog
@CountryVlog Год назад
Atlast found the perfect solution. Thanks brother
@QuickProgramming
@QuickProgramming Год назад
Happy to help! am glad you found it useful. Dont forget to also check the update where i added more functionality here ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-xgFPPT7-OqM.html
@GerritforBazeja
@GerritforBazeja 8 месяцев назад
Thank you very much for sharing your video-lesson. Esspecialy the way your handeling it. step by step makes it very understandeble
@abdulquadri6130
@abdulquadri6130 Год назад
Fantastic, I really want this . Can not wait to watch this. Your your teachings are so great and the impacts it has created in me as a php developer is wonderful. keep it up man. Thank you Quick Programming.
@QuickProgramming
@QuickProgramming Год назад
awesome, am glad to hear it
@phpstudy8625
@phpstudy8625 Год назад
Great job BRO , you are the Best !!!
@QuickProgramming
@QuickProgramming Год назад
Thanks a lot!
@martebest
@martebest Год назад
Great tutorial. Very well explained. Thanks a million. :)
@elbromas12459
@elbromas12459 Год назад
You are Best, thanks for all course
@QuickProgramming
@QuickProgramming Год назад
You're most welcome and thanks for your awesome feedback😊
@benalidounia
@benalidounia 9 месяцев назад
thank you for this great tutorial !!
@GRCG
@GRCG Год назад
Love it, but I would like to see how you can add in this MVC a shopping page and cart that is connected with a database and handle it from out the admin. I'm new in this and want to learn more on how you can build up from out that base MVC. Product must contain size, color and so on, because when you search for a shopping page with check out nobody use these settings during when you want to buy something you pick your size and color
@jaynoscap
@jaynoscap 6 месяцев назад
Thanks for this tutorial It helps me a lot well explained and solid❤
@anmarm.9487
@anmarm.9487 Год назад
Thank you for the awesome tutorial. a suggestions, add Request and Response Class, then a simple validation class, You will have a beautiful MVC framework that work as a base for all small websites and APIs hence Response Class. Nevertheless, Great tutorial.
@QuickProgramming
@QuickProgramming Год назад
Thanks for the suggestions. i'll be making a follow up tutorial to add more functionality soon. a request class and validation class will be included and a few more classes to speed things up
@zorahypatia
@zorahypatia Год назад
Thanks bro you are safe my life
@QuickProgramming
@QuickProgramming Год назад
you're most welcome
@Izkawi33
@Izkawi33 Год назад
you are the best teacher thanks
@fa6805
@fa6805 Год назад
The routing is fine but it is how Codeigniter does it. Laravel does it differently and is more robust cause you can clearly define the request method and map the appropriate controller method. With codeigniter example your can’t tell if its a get, post, patch etc without doing additional check. Anyway, it’s good if you are just beginner learning how it works as this is one way to do it.
@QuickProgramming
@QuickProgramming Год назад
in this you can also specify the method because the second item is the method, e.g in this link, 'edit' is the method 'website.com/product/edit'. laravel is too complex for no reason. code igniter is slightly less complex, so i prefer it. Sure laravel can specify if its a GET or POST request but whats the real world application of that? it just creates a lot of 'page not found' scenarios. better to check using the request class or server method. The complexity of laravel is what i try to avoid by creating my own framework. if i copy laravel exactly then its better i just use laravel because it already exists. i could save time. in the end its all about preference i guess, i prefer making things myself, that way am not lost when a clients wants to change anything
@helloholahi
@helloholahi Год назад
i didn't finish the video yet, but just, at 20:12 it's a bad idea to indicate the directory of your admin files in here, in terms of security, because it makes it very easy for hackers to know where to search for your backoffice! you can instead: - ask google not to index these pages from google search central - add php headers at the beginning of your files: header("X-Robots-Tag: noindex", true); - add a meta tag in your html:
@QuickProgramming
@QuickProgramming Год назад
That's not the real admin folder. There will be no such folder on the website. All links are simply mod rewrites and not real folders
@mingming1869
@mingming1869 4 месяца назад
❤Thankyou! gonna do my capstone
@kushkumarsoni3654
@kushkumarsoni3654 Год назад
Awesome content sir ..plz create a playlist for creating own php MVC framework
@QuickProgramming
@QuickProgramming Год назад
i'll be using this same framework to make alot of tutorials on converting templates to working websites, so yes there'll be a playlist🙂
@tylerflaviano2023
@tylerflaviano2023 Год назад
always the best teacher
@QuickProgramming
@QuickProgramming Год назад
Thank you :)
@HuyTran-cl6ny
@HuyTran-cl6ny Год назад
From VietNam with Love ❤❤
@QuickProgramming
@QuickProgramming Год назад
Awesome!
@drkentcw
@drkentcw Год назад
thanks it was great. better to replace a silent keyboard and mouse, get prepared for the course. You have been copying/moving/making changes/forgot your code back-and-forth many times.
@QuickProgramming
@QuickProgramming Год назад
Am a busy person. I don't have the time to prepare for a course. I code in real time. The back and forth is important because it shows you how coding is like in the real world, rather than showing a perfect version which never happens in real life. However, there are plenty of shorter and well peppered videos online, so you don't have to watch mine
@clavikLeniv
@clavikLeniv Год назад
Дякую!!!! Gracias!!! THANK you very mach!
@QuickProgramming
@QuickProgramming Год назад
You're most welcome 😊😊
@ilya_123__
@ilya_123__ 6 месяцев назад
thank you!!
@QuickProgramming
@QuickProgramming 6 месяцев назад
You're welcome!
@3bdofocus761
@3bdofocus761 Год назад
hello quick i need your advice i have learned [ html - css - php - mysql - basics of ajax - api - laravel ] what aslo i need to learn to be backend developer and i am junior by the way and what is the next steps to be pro from your opinion ❤❤❤❤
@QuickProgramming
@QuickProgramming Год назад
to become a pro, learn OOP. after that, all you need is actual experience. start building actual websites. ask people who need websites if you can build them one for free. even friends and family if possible. the experience you get from it is invaluable. you can then use those same websites as part of your portfolio when looking for work. people care more about your work experience
@rimantasdanilevicius6754
@rimantasdanilevicius6754 Год назад
Fresh stuff on youtube! Thanks! Question - can this MVC used in production?
@QuickProgramming
@QuickProgramming Год назад
yes it can. Thats what i use in my own projects, ofcourse with a few added features but no major differences
@rimantasdanilevicius6754
@rimantasdanilevicius6754 Год назад
@@QuickProgramming Bro, I was looking such video sine 2017! Thank you for confirmation. Now it time to get hands dirty! I SUBSCRIBE!
@__-bk6mm
@__-bk6mm Год назад
This is amazing! Could you do a video showing how to convert the social media project to this structure?
@QuickProgramming
@QuickProgramming Год назад
i used this framework to make a simple social website here ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Hsph_-1EbPA.html
@KoJIJoky
@KoJIJoky 7 месяцев назад
Awesome course, thanks a lot
@HolisticFX-f2z
@HolisticFX-f2z 4 месяца назад
Hi, I find this tutorial absolutely priceless. It's got my thumbs up! (see my reply below. it was an easy fix due to my error) Everything worked out fine until I got to 2 hours and 7 mins. It's definitely not a criticism but I have to point out that the return query doesn't work for me, it throws an error. This is the error message. Fatal error: Uncaught Error: Call to undefined method Model::query(). I'm pretty newbie so I am not sure why you don't get the error but I do. I have checked the syntax line by line and it's identical and it ran fine up to the echo() of the query, but not with the code changes that followed including the return of the query. Any input would be appreciated.
@HolisticFX-f2z
@HolisticFX-f2z 4 месяца назад
​ @QuickProgramming if you get chance to comment on my post that would be greatly appreciated.
@QuickProgramming
@QuickProgramming 4 месяца назад
the error is saying you dont have a function called 'query' in your model class. This could be because you're not including or extending the database class inside your model. SO make sure you have the parts the 'extends database' in your model declaration. e.g class Model extends Database{ Or it could be a spelling error. Make sure the function in the database class is exactly named 'query' and not something else.
@HolisticFX-f2z
@HolisticFX-f2z 4 месяца назад
​@@QuickProgramming since you gave you those suggestions it helped me question if I had done something wrong. I checked back over the video slowly from around 1 hour 40 mins. It turns out that at 1 hour 47 mins, because you cut and paste the function query() between the core files model.php and the database.php and back again, that I forgot to paste the public function query() back into Trait Database {} in database.php. It's definitely given me experience of understanding the code better. Thanks again for your time in giving me direction.
@QuickProgramming
@QuickProgramming 4 месяца назад
@@HolisticFX-f2z you're most welcome. debugging experience is very important as it makes you a better programmer. Am glad you sorted it out :)
@HolisticFX-f2z
@HolisticFX-f2z 4 месяца назад
@@QuickProgramming Thanks again.. debugging definitely draws my attention to the details. I suspect i'll continue to get more bugs as I continue to create errors in the syntax also :) I just wish I was at the same level of creativity as you and have knowledge of the functions like you do!
@sakmaestro3852
@sakmaestro3852 10 месяцев назад
Do u hvae udemy course complete project?
@aoaxe
@aoaxe 13 дней назад
instant subscribe brother
@chronicleofgreatness121
@chronicleofgreatness121 Год назад
Great teacher of our time on RU-vid, Please can we have this tutorial for download letter, i need it so i can be practicing it when am offline
@QuickProgramming
@QuickProgramming Год назад
thanks, i think using the youtube app you can download for offline viewing
@chronicleofgreatness121
@chronicleofgreatness121 Год назад
@@QuickProgramming Thanks, I have downloaded it for offline view. More grace.
@abdokhaled4488
@abdokhaled4488 Год назад
i am so excited for the course can you make course about lumen microframework
@QuickProgramming
@QuickProgramming Год назад
I'll check it out
@TheAdamsalam
@TheAdamsalam Год назад
Thanks for these great tutorials, I believe you are one of the best on youtube. Do you have an Udemy channel, please? just for follow on complete production applications.
@manjonex
@manjonex Год назад
Thank you for the lesson , please trying to impliment a website that has admin , how do i arrange the folders and controllers
@ripon59
@ripon59 5 месяцев назад
Pure gem
@tunamusic2314
@tunamusic2314 2 месяца назад
should we use framework, how tradition php over using framework (like laravel) ?
@sakmaestro3852
@sakmaestro3852 10 месяцев назад
Sir which do u prefer framework laravel, symfony or codeigniter?
@ابوأحمد-ث9ت4ض
@ابوأحمد-ث9ت4ض 2 месяца назад
Thanks a lot
@aravind_gowda
@aravind_gowda Год назад
Please build a news website with mvc and user can also create news content by registering .. and add districts states
@QuickProgramming
@QuickProgramming Год назад
alright, will work on that
@CivicYt
@CivicYt Год назад
You just want him to code the project for you? ;)
@__-bk6mm
@__-bk6mm Год назад
@@CivicYt I was thinking that as well, kinda came across as "make my website" lol
@Test-u9q
@Test-u9q 11 месяцев назад
please upload more MVC Project
@jworkman753
@jworkman753 Месяц назад
Since the protected variables were declared in the trait Model, how do you overwrite them when using the trait model in another model (my model) using trait Model? would you use the constructor? the variables must be the same as the trait, but I want to change the variables based on the table from the database I am querying? I hope that makes sense what I am asking.
@Saboor-Hamedi
@Saboor-Hamedi Год назад
This is amazing brother, but I encounter a problem here, I am using a live server, php -S localhost:8888, and when I run print_r($_GET), I get an empty array, could you help me with that, please.
@akordeonista
@akordeonista Год назад
Hello Eathorne, There is one thing I dont understand about model. When we execute the statement we give a array to execute() function. And now: For example the prepaired query is: SELECT * FROM users where id = :id for execution we give information that [ 'id' =>4] - there is no expressions ":id" (with a colon). How does the computer know that it should associate ":id" with "id"? W bindValue we should use (':id' , $x =4)...
@QuickProgramming
@QuickProgramming Год назад
the keys of the array must match the keys in the array. in this case the :id will be mapped to 'id' in the array
@akordeonista
@akordeonista Год назад
@@QuickProgramming Unfortunately, I still don't understand :( does this mean that the computer will look for the most similar key? It doesn't have to be identical? Does prefixing the key with a colon have any meaning here?
@QuickProgramming
@QuickProgramming Год назад
@@akordeonista the colon is there to tell PDO that the text is a variable to be taken from the array. without the colon it wont look in the array
@akordeonista
@akordeonista Год назад
@@QuickProgramming OK, thats clear, thank you
@envadd.6556
@envadd.6556 Год назад
You are the best teacher when it comes to coding for sure!! I was wondering how would we go about templating when we have the same header and footer used on all pages without copying them on every page... Where would we use them? Would it be the index page, or would we create something else that gets pulled before and after each view?
@QuickProgramming
@QuickProgramming Год назад
thanks. you can load any view file, including the header if you save it as a separate file and then load it the same way you load other view files inside another view, e.g $this->view('header'); i made a simple social website using this framework here. you can get some ideas from there. this is a link to all related videos, but you can just watch the one with the social website for your issue. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Hsph_-1EbPA.html&pp=gAQBiAQB
@envadd.6556
@envadd.6556 Год назад
@@QuickProgramming Thank you for a prompt reply! - I am working on a platform and would like to use your MVC instead of procedural PHP as usual. Appreciate all your hard work, as I learn a lot from you!
@pratikbhujel
@pratikbhujel Год назад
Sir please Extends this as HMVC framework, Would greatly help.
@funckysom7817
@funckysom7817 8 месяцев назад
Your framework router logic looks like the CakePHP routing logic. The first segment of the incoming request should match with a name of a controller class. It's a little weird for me
@liviubarburo
@liviubarburo Год назад
Very nice. When is next video using this mvc?
@QuickProgramming
@QuickProgramming Год назад
i'll be making a lot of websites using this framework, and we'll improve it over time to speed production times. there will be lots to learn from it
@rushinsandeepane2883
@rushinsandeepane2883 Год назад
Thank you sir
@QuickProgramming
@QuickProgramming Год назад
You're most welcome :)
@ПётрТатамович
@ПётрТатамович Год назад
Great tutorial. It really helps me. I really hate PHP, but in the same time I understand how cool is this language. Following this tutorial, it were many mistakes, and all of them was because I made mistakes in some name of variables (lost concentration I guess). Now I have an issue with inserting new user in the table. When I use show($_POST) it shows me the inputs, but freaking $user->insert($_POST) does not! What is the problem?
@ПётрТатамович
@ПётрТатамович Год назад
The problem is in terms actually. Accepting the terms is part of validate function. And after you put check mark to Accept the term it's value becomes the part of what you try to post. But there is no terms column in users table. If I remove accept the terms from validate function it works. But I don't understand why is it worked for you, man ?
@MdRabby-tg2fh
@MdRabby-tg2fh Год назад
Amazing tutorial☺️☺️☺️,, can you make a wordpress plugin development course ?? 😐🤔🤔
@QuickProgramming
@QuickProgramming Год назад
thank you. i made one here to get you started ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-_MClmXiYCSw.html
@MdRabby-tg2fh
@MdRabby-tg2fh Год назад
@@QuickProgramming This is theme development. What to make plugin development video in the future
@QuickProgramming
@QuickProgramming Год назад
@@MdRabby-tg2fh oh I see. It's not very different though. Plugins are just a smaller version of themes. But I'll make one soon
@MdRabby-tg2fh
@MdRabby-tg2fh Год назад
@@QuickProgramming i am waiting for your video
@singlefocustechnology
@singlefocustechnology Год назад
Greetings to you my PHP hero, and greetings to everyone committed to this unique discussion thread. Please sir, can this MVC be used for public production???
@QuickProgramming
@QuickProgramming Год назад
yes it can
@singlefocustechnology
@singlefocustechnology Год назад
Thanks sir. Greetings to you my PHP hero. Please sir, could you do a tutorial for payment wallet using this MVC.
@wayneshen5201
@wayneshen5201 Год назад
Good job sir
@QuickProgramming
@QuickProgramming Год назад
Thanks :)
@lawrencenoah9511
@lawrencenoah9511 8 месяцев назад
Nice tutorial
@gerryaustin6294
@gerryaustin6294 Год назад
I had a general error when attempting to Insert or update around the 2 hour mark in the video. Changing the line in Database.php if(check) to if(check > 1) fixed it. I dont know if anyone else had the same problem.
@QuickProgramming
@QuickProgramming Год назад
Thanks for leaving a tip to others
@Matex__
@Matex__ Год назад
whats the difference between first and get row methods?
@QuickProgramming
@QuickProgramming Год назад
good question. the get_row function is for running a query, first function uses an array instead. using the first function you dont need to specify a table or even type a query. but there are times when you need to run a complex query and need only one result, thats when you use the get_row function
@AsmaKhan-qf6gd
@AsmaKhan-qf6gd Год назад
can we use in production sir?
@jhon.k.3227
@jhon.k.3227 Год назад
Thanks for the video, you are a great teacher, can I ask if it's possible to send data with Ajax from login page to controller Login in this MVC ? I have tried, but failed.
@QuickProgramming
@QuickProgramming Год назад
sure its possible. the code below will send data to the controller of whatever page you're on. let xhr = new XMLHttpRequest(); xhr.addEventListener('readystatechange',function(e){ if(xhr.readyState == 4 && xhr.status == 200) { alert(xhr.responseText); } }); xhr.open('post','',true); xhr.send(); to send to a specific controller, add the full path to that controller in the open part like this: xhr.open('post','/home',true); ROOT represents the absolute http path to your project, e.g localhost/mvc/public
@jhon.k.3227
@jhon.k.3227 Год назад
@@QuickProgramming I get a way to pass the ajax Post variables to the controller page, however, when trying to instant the Class I receive a error: Class "Login" not found in C: \xampp\htdocs\MVC\app\controllers\Login.php:12
@jhalmu
@jhalmu Год назад
What is that "show" function you use in Database.php? And thanks fot tutorial. EDIT: Found it :)
@DadNotmyname
@DadNotmyname 2 месяца назад
MVC may be simple and popular but has code exposed to the public found in every controller. It is also not dynamically created. A better system is where there is one controller that is called and altered in the background by separate code not on the controller but held in a different place. Connections to dbases being modular. Write the code once and use it as requested. Each time a visitor comes to a webpage (controller), they are actually visiting the same page and it has been recalled and adapted according to the url, the connections required and security rights being satisfied. So no matter how a website or code is accessed the security of the code itself, not just the controller, is in place, with all code invisible and all code under tight security.
@akordeonista
@akordeonista Год назад
Hi Eathrone, Why do we use 'require' instead of 'include' in that case?
@QuickProgramming
@QuickProgramming Год назад
You use include if the file you want to include is optional. Include will throw a warning if the file is not found but the code will continue executing. When you use require, the code stops executing when the file is not found. It throws a fatal error. I prefer require in this case so the cod doesn't continue if the file inst found. You can use include if it suits your purpose better. It's just a matter of preference
@akordeonista
@akordeonista Год назад
@@QuickProgramming thanks a lot
@ElMetzy
@ElMetzy Год назад
i dont know why im getting a 0 value for the array with empty value, also $_GET['url'] didnt worked for me i had to use $_SERVER['REQUEST_URI'] did this things changed with php 8?
@aguswidi9316
@aguswidi9316 Месяц назад
How to move this MVC to nginx server?
@krishu1632
@krishu1632 6 месяцев назад
Did you use laravel framework in this project?
@QuickProgramming
@QuickProgramming 6 месяцев назад
No, we made our own framework
@ANILKUMAR-vy4nr
@ANILKUMAR-vy4nr 6 месяцев назад
Hello to everyone. Please solve my problem. When we make a page named about-us then show page not found. Already create about-us.view.php page and Aboutus.php controller. Plz help me
@QuickProgramming
@QuickProgramming 6 месяцев назад
Controller file name.should be About_us.php, not Aboutus.php. please note the underscore
@Psyzenn
@Psyzenn Год назад
For example I have allowedColumns array and I found the issue for example if I insert user I need "created" and when I update I need "modified" but never both together. Does this mean I have to create a new protected variable ?
@HughflynncomposerMP3
@HughflynncomposerMP3 Год назад
I had a problem with Model extends Database as a got a fatal error about not extending a Trait
@QuickProgramming
@QuickProgramming Год назад
you cant extend a trait, you use it instead. so put it luke this: class Model { use Database; //model functions and other code come here }
@user-xv4fb5wz9i
@user-xv4fb5wz9i Год назад
Thanks for the guide. It's really very easy to understand, good work! I just have a question about the public directory. What is the best way to implement it so that it is no longer indicated in the URL? So that you only see your domain. Many thanks in advance!
@QuickProgramming
@QuickProgramming Год назад
the public folder never shows up on the live server. its just there to organise your files better on your local machine. on a live server, you will be given a public folder there as well to put your files. thats where you will add the files that are in your local public folder too
@user-xv4fb5wz9i
@user-xv4fb5wz9i Год назад
​@@QuickProgramming Ahh okay, thank you for your response! You said in your video that it is not possible to load JS files inside the app folder. Couldn't this be used within the view Pages: So the script is inserted as JS content within the head area. Maybe they is a better way to insert the JS file for each view page over the controller class? So you don't need to put the script tag on each view page.
@QuickProgramming
@QuickProgramming Год назад
@@user-xv4fb5wz9i yes you can load JS & CSS that way but its inefficient. the reason we load JS & CSS files using the tags is because a user's browser can store them locally. This means they only need to be loaded once on the first page load. This is known as caching. loading the js as part of the HTML adds bulk to the code being loaded on every request. furthermore, you cant do this for images since you can use the require or include on them. you'll still need to put them in the public folder. so why not just put your JS and CSS files in there too? i just dont see the point of trying to hide JS files when the user can still see the JS code no matter how its being loaded
@user-xv4fb5wz9i
@user-xv4fb5wz9i Год назад
@@QuickProgramming Thank you for your extensive answer! You are right that JS code is usually always used for client-side rendering. I understand why you used this folder structure for the software. My message does not aim to be more critical of this. I'm just testing what I can do with PHP and vanilla JS to make my JS code less readable. I already use techniques like obfuscation and minification. In the future I would like to further limit access to the code by running the code on the server and the client only holding the resulting HTML code. Like this example: Restricted Access Click me
@ashavdetroja1395
@ashavdetroja1395 Год назад
Why You're not Making Fully crud operation video?
@QuickProgramming
@QuickProgramming Год назад
i've made a few using this framework. here is one ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-4AoRVc89rBs.html
@dastgirakhtar9782
@dastgirakhtar9782 Год назад
Nice
@QuickProgramming
@QuickProgramming Год назад
Thanks
@andrejoshuab.bautista3969
@andrejoshuab.bautista3969 6 месяцев назад
I can't seem to load pictures
@MinhazTaher
@MinhazTaher Год назад
i want to write SELECT * FROM users WHERE id = 1 id != 2. How can i modifiy where method inside model class ? its not working when i pass $model->where([id=1],[id=2]). Because array_marge replace delicate key. video Timeline 2:07:23
@QuickProgramming
@QuickProgramming Год назад
i think you forgot the '&&' like this: SELECT * FROM users WHERE id = 1 && id != 2. but this query doesnt make much sense because if id is 1 then its not 2, this means there is no need for the last part of the query which says 'id != 2'
@MinhazTaher
@MinhazTaher Год назад
@@QuickProgramming Thanks for the reply. Really appreciate. actually, i try to build SQL with an "OR" operation like you. like SELECT * FROM users WHERE name = 'A' or name = 'B". $data_or = ['name' => 'A', 'name'=>'B'] $data_or showing only ['name'=>' B'] as an associative array can not contain duplicate key. any idea how to build this SQL like you? so far my code if (!empty($dataOr) && isset($dataOr)) { $this->sql .= '('; foreach ($dataOr as $key => $value) { $this->sql .= $key . ' = ? OR '; array_push($this->val, $value); } $this->sql = rtrim($this->sql, ' OR '); $this->sql .= ')';
@aymanalredi66
@aymanalredi66 Год назад
Hi sir, thanks for this tutorial! how do not allow duplicates when entering data in your insert method?
@QuickProgramming
@QuickProgramming Год назад
you can use data validation to avoid that. then run the insert method only after checking if values are unique. i made a tutorial on form validation here ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ymPlbgz6BoU.html
@aymanalredi66
@aymanalredi66 Год назад
Hi sir, I didn’t understand why you used unset in update and insert for data, why is it needed at all?
@QuickProgramming
@QuickProgramming Год назад
unset is used to remove all keys from the array that are not found in the database table or the ones you dont want to allow edits. if you remove unset, the function will create a query that has columns that dont exist in the table and so your query will not run. e.g if you have a user signup page, you will have the following fields: username, email, password, retype_password, accept_terms_and_conditions. but your database table will have only these columns: username, email, password. so when you do this: $user->insert($_POST); the function will create a query that includes all fields from your form. this query will not work because it contains "retype_password" and "accept_terms_and_conditions". the unset part will remove these columns that dont exist in your table. you can also use this to make sure some columns are never edited, e.g the id column or date_created column. the unset part can remove these columns for you automatically from the query. watch this video where i use the framework to make a website ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Hsph_-1EbPA.html
@aymanalredi66
@aymanalredi66 Год назад
@Quick Programming thank you sir, you are the best!
@abdomahmoud8769
@abdomahmoud8769 11 месяцев назад
As the 404 page is static, I think we don't have to create a controller for it since it won't deal with the database and won't need to be controlled.
@QuickProgramming
@QuickProgramming 11 месяцев назад
the controller is required to load the view, so you cant have a page without a controller, unless you change the framework to accommodate that part. But its a waste of time to add extra code just to fix one page issue. Its just better to have an empty controller. less code, better performance
@abdomahmoud8769
@abdomahmoud8769 11 месяцев назад
​@@QuickProgramming It's not a big deal, anyway thank you for responding so quickly
@MiyamotoMusashi-kr2cp
@MiyamotoMusashi-kr2cp 5 месяцев назад
I am going to build a web portal for our company and I don't want to use any existing php framework. Can I follow this tutorial and use this framework as my reference or structures for our company web portal?
@QuickProgramming
@QuickProgramming 5 месяцев назад
Yes, that's what it's for. I use this too for my own websites. That way you understand every line of code and so fan easily change anything and add new features as you wish
@QuickProgramming
@QuickProgramming 5 месяцев назад
Sure you can
@neelamadhabpanda3959
@neelamadhabpanda3959 6 месяцев назад
Is there any php oop for beginner course in this channel . Before following MVC
@QuickProgramming
@QuickProgramming 6 месяцев назад
yes, its here ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-wr6EuooKvLU.html
@neelamadhabpanda3959
@neelamadhabpanda3959 6 месяцев назад
@@QuickProgramming thank you 😊
Далее
Why Scientists Are Puzzled By This Virus
10:44
Просмотров 2,5 млн
Everything Starts with a Note-taking System
21:23
Просмотров 251 тыс.
iPhone 16 Pro Max vs Samsung S24 Ultra Camera Battle!
16:44
Brutally honest advice for new .NET Web Developers
7:19
Can 1 Woke Teen Survive 20 Trump Supporters?
1:42:42
Просмотров 3,2 млн