Awesome series, what I most enjoy about this series is that you take us with you in your thought process about how to implement things and what the pros and cons are when you implement them. Thank you very much
im using sublimetext, i dont have phpstorm, in phpstorm "use app\core\Model" is auto generated or by means of keys, but in sublimetext you need to type it manually. so if you miss that u lost that "use" at the top of the php file and its gives you an error.. so better use phpstorm to follow the tutorial smoothly.. nice work mate!
Thank you so much for the fun-straigh forward-easy to follow course. So I suppose the majority of the audience here are juniors, Can you please throw a video with tips and advices on how to find a job for junior developers (also remote jobs). I am sure everyone here will appreciate that! thank you again Zura!
You are awesome, you are making amazing things with php, I try to validation with jquery but php acting like jquery it is perfect. I will continue other videos.
"That's way people said: PHP is ugly language, because of it,I hate it!" - Mentor But the mentor keep going with the tutorial series! and I am laugh very loud in my house and keep watching it! DOUBLE KILL TWITS!
Thanks buddy. I finished recording and posting videos on framework.. The only thing I am thinking to add is to setup it on xampp or deploy it on heroku. Let's see if many people asks about it...
Well I hopefully wish you will make one and please be assured that I will share your fb page to my friends on FB, I'm still a student and don't the have an income yet so this is my own way of showing gratitude
Hi sir, thank you for this amazing tutorial, how to resolve RULE::UNIQUE when updating data? when old data is not changed will be a problem because the error message appears "Record with this field already exists", how to overcome it? I apologize if my grammar is not polite
hello, the solution you did for the error you got on 46:46 didn't work for me, do you have any idea why? my PHP version is 7.4.9 and after I var_dump($this) on __toString() in core/form/Field.php I got [object(app\core\form\Field)#9 (0) { ["model"]=> uninitialized(app\core\Model) ["attribute"]=> uninitialized(string) }]
@@TheCodeholic Hi. I am having this error Fatal error: Uncaught Error: Call to a member function field() on string in C:\xampp\htdocs\MVCF\views egister.php:5 in the same part.
Hi.thank you for this tutorial. i got an error on Field.php. Fatal error: Uncaught Error: Typed property App\core\form\Field::$model must not be accessed before initialization in C:\xampp\htdocs\wagestNEW\core\form\Field.php:28 Stack trace: #0 C:\xampp\htdocs\wagestNEW\views egister.php(14): Seems that i have to initialize in Field.php the property public Model $model; But, How do I initialize it? Thanks!
when changing the filed type you could just pass the type argument to filed __construct like this public function __construct(Model $model, string $attribute, string $label, string $type, string $placeholder) { $this->model = $model; $this->attribute = $attribute; $this->label = $label; $this->type = $type; $this->placeholder = $placeholder; } and in field you can do something like this echo $form->filed($model, 'name', 'Enter your name', 'text', 'Dev Alison'); won't that be better ?
awesome and nice tuto . i would like to know in the case of checkbox , radio o textarea we implements anohters functions to treat this type because you just treat the case of input text and thank you
The form validation could be done easily in the browser (with javascript), before the form ever gets submitted. The submit button can be disabled until the form is valid. I'm not sure what the advantage of doing it on the server is.
Doing validation on client side is great but never enough. A little experienced person can easily bypass javascript validation and submit the form. It you don't have backend validation invalod data will appear in the database. My advice is to always do backend valodation first and javascript validation is bonus.
@ 45:05 what is this called when your accessing the variables in the object? Learn about it first here I also added a function for cleaner looking labels: protected function cleanLabel( String $word) { $words = preg_split('/(?=[A-Z])/', $word, 0, PREG_SPLIT_NO_EMPTY);
return ucwords(implode(' ', $words)); } Just throw the attribute in here. THANK YOU ZURA BTW
Hi sir, thank you for this amazing tutorial. I'm learning a lot from it. I reached from 1st video to this one and I have a question. Maybe it would have been done in the next videos but I'm asking just out of curiosity. Wouldn't it be better to have validation on Request instead of a model?
Mostly by working a lot. I wanted to understand how things were working so I dived in deep and found things. Work, experiment and read as much as you can.
Anyone doing this in 2024? Got stuck here and maybe can someone suggest the solution: Fatal error: Uncaught TypeError: app\core\form\Form::field(): Argument #1 ($model) must be of type app\core\Model, null given, called in C:\MAMP\htdocs\views egister.php on line 30 and defined in C:\MAMP\htdocs\app\core\form\form.php:23 Stack trace: #0 C:\MAMP\htdocs\views egister.php(30): app\core\form\Form->field(NULL, 'name') #1 C:\MAMP\htdocs\app\core\Router.php(93): include_once('C:\\MAMP\\htdocs\\...') #2 C:\MAMP\htdocs\app\core\Controller.php(8): app\core\Router->renderView('register', Array) #3 C:\MAMP\htdocs\app\controllers\authController.php(38): app\core\Controller->render('register', Array) #4 [internal function]: app\controllers\authController->register(Object(app\core\Request)) #5 C:\MAMP\htdocs\app\core\Router.php(69): call_user_func(Array, Object(app\core\Request)) #6 C:\MAMP\htdocs\app\core\Application.php(24): app\core\Router->resolve() #7 C:\MAMP\htdocs\public\index.php(26): app\core\Application->run() #8 {main} thrown in C:\MAMP\htdocs\app\core\form\form.php on line 23
Awesome series, what I most enjoy about this series is that you take us with you in your thought process about how to implement things and what the pros and cons are when you implement them. Thank you very much
Awesome series, what I most enjoy about this series is that you take us with you in your thought process about how to implement things and what the pros and cons are when you implement them. Thank you very much
im using sublimetext, i dont have phpstorm, in phpstorm "use app\core\Model" is auto generated or by means of keys, but in sublimetext you need to type it manually. so if you miss that u lost that "use" at the top of the php file and its gives you an error.. so better use phpstorm to follow the tutorial smoothly.. nice work mate!
This is amazing! Very informative, different approaches, which one is best and why. Definitely going to see this all the way through.
Thanks a lot man
You're the best bro! Your php videos are the best on UA-cam. Thanks!
Huge thanks my friend...
The tutorial is awesome and i'm really enjoying every seconds of it.
Amazing. Thanks for your comment
Thank you so much for the fun-straigh forward-easy to follow course.
So I suppose the majority of the audience here are juniors, Can you please throw a video with tips and advices on how to find a job for junior developers (also remote jobs).
I am sure everyone here will appreciate that! thank you again Zura!
great series dude.....awsoem content
Awesome tutorial! Keep goin'
You are awesome, you are making amazing things with php, I try to validation with jquery but php acting like jquery it is perfect. I will continue other videos.
Thank you buddy
Thank you from Indonesian programmer
I'm a donet guy but I find this very interesting... Thanks you 🥇🥇🥇
Thank you buddy.
"That's way people said: PHP is ugly language, because of it,I hate it!" - Mentor
But the mentor keep going with the tutorial series! and I am laugh very loud in my house and keep watching it!
DOUBLE KILL TWITS!
tq sir, this video also very good and i learn new skills from these video tq sir.
Now this is an advance way of coding that I`m looking for
Thanks buddy.
I finished recording and posting videos on framework.. The only thing I am thinking to add is to setup it on xampp or deploy it on heroku.
Let's see if many people asks about it...
Well I hopefully wish you will make one and please be assured that I will share your fb page to my friends on FB, I'm still a student and don't the have an income yet so this is my own way of showing gratitude
Thank you my friend.
Sharing and liking is absolutelly enough.
Hi sir, thank you so much. Very clean code and lots of juicy stuff.
Hi sir, thank you for this amazing tutorial, how to resolve RULE::UNIQUE when updating data? when old data is not changed will be a problem because the error message appears "Record with this field already exists", how to overcome it? I apologize if my grammar is not polite
great video 👌
hello, the solution you did for the error you got on 46:46 didn't work for me, do you have any idea why? my PHP version is 7.4.9 and after I var_dump($this) on __toString() in core/form/Field.php I got [object(app\core\form\Field)#9 (0) {
["model"]=>
uninitialized(app\core\Model)
["attribute"]=>
uninitialized(string)
}]
If you assign some value to firstnamw it should not give you the error any more.
Pay attention... maybe there is different error and not the same one
@@TheCodeholic Hi. I am having this error
Fatal error: Uncaught Error: Call to a member function field() on string in C:\xampp\htdocs\MVCF\views
egister.php:5 in the same part.
it said that is undefined %model in register.php but I imported Model in Field... :/:/ heeeelp
I dump $model and gave me this
object(app\models\RegisterModel)#7 (6) {
["firstname"]=>
string(0) ""
["lastname"]=>
string(0) ""
["email"]=>
string(0) ""
["password"]=>
string(0) ""
["confirmPassword"]=>
string(0) ""
["errors"]=>
array(0) {
}
}
There is a problem in creating $form variable.
Check the github repository and compare the code and understand what is different.
App\core folder is missing in Github repo
Can u make a full project like e commerce? It wud be a good project to learn
Can this be implemented with other type of input? For example select? And if yes how?
Hi.thank you for this tutorial. i got an error on Field.php.
Fatal error: Uncaught Error: Typed property App\core\form\Field::$model must not be accessed before initialization in C:\xampp\htdocs\wagestNEW\core\form\Field.php:28 Stack trace: #0 C:\xampp\htdocs\wagestNEW\views
egister.php(14):
Seems that i have to initialize in Field.php the property
public Model $model;
But, How do I initialize it? Thanks!
Awesome sir!
when changing the filed type you could just pass the type argument to filed __construct
like this
public function __construct(Model $model, string $attribute, string $label, string $type, string $placeholder)
{
$this->model = $model;
$this->attribute = $attribute;
$this->label = $label;
$this->type = $type;
$this->placeholder = $placeholder;
}
and in field you can do something like this
echo $form->filed($model, 'name', 'Enter your name', 'text', 'Dev Alison');
won't that be better ?
عظمة على عضمة
Great tutorial
Thank you
Love from indonesia
Thanks buddy
awesome and nice tuto . i would like to know in the case of checkbox , radio o textarea we implements anohters functions to treat this type because you just treat the case of input text and thank you
The form validation could be done easily in the browser (with javascript), before the form ever gets submitted. The submit button can be disabled until the form is valid. I'm not sure what the advantage of doing it on the server is.
Doing validation on client side is great but never enough. A little experienced person can easily bypass javascript validation and submit the form. It you don't have backend validation invalod data will appear in the database.
My advice is to always do backend valodation first and javascript validation is bonus.
@@TheCodeholic Gotcha. That makes sense.
Plese do you have a PHP for beginner course. You are very knowledgeable and I love how you teach.
Yes I do have 5 hours course on my channel.
@@TheCodeholic Is PHP your main PL or most used PL?
At the moment PHP is my mostly used programming language.
Generally I try to be language agnostic.
@@TheCodeholic and Laravel is your most used framework? am I right?
After this, will you be making a laravel tutorial ?
Laravel is the most popular and demanded framework... Yes I will make Laravel tutorials also...
From Bangladesh ❤️
@ 45:05 what is this called when your accessing the variables in the object? Learn about it first here
I also added a function for cleaner looking labels:
protected function cleanLabel( String $word)
{
$words = preg_split('/(?=[A-Z])/', $word, 0, PREG_SPLIT_NO_EMPTY);
return ucwords(implode(' ', $words));
}
Just throw the attribute in here.
THANK YOU ZURA BTW
great series dude. love it
Glad you enjoy it!
WOW.... just awesome =D
Thanks man
Great job!
Hi sir, thank you for this amazing tutorial. I'm learning a lot from it. I reached from 1st video to this one and I have a question. Maybe it would have been done in the next videos but I'm asking just out of curiosity. Wouldn't it be better to have validation on Request instead of a model?
Hey, one question if I may: How did you learn all of it? Mostly at work?
Mostly by working a lot.
I wanted to understand how things were working so I dived in deep and found things.
Work, experiment and read as much as you can.
Anyone knows how to customize in phpstorm method var_dump() to show up with tags automaticly? Like in 23:03
You need to create live template
@@TheCodeholic Nice :) thx man, working perfectly. It''ll save me a lot of time ;)
how can you do that code template, when you enter dump it autocomplete with and exit; thats amazing.
I have configured PHPStorm Live templates
Please enter the middle codes of the project
hello, please also make video for REST API in php
It's REALLY a nice series. However, it's not from scratch... I thought that will be EVERYTHING from scratch, even the core code.
This is second part. Watch the first part first: ua-cam.com/video/GTESlsYTUns/v-deo.html
thank you!
we have one mistake. Register form reload and load main layout .
i dindt se it but it seams great cuz therei is no turorials on this concept
💫
Anyone doing this in 2024? Got stuck here and maybe can someone suggest the solution:
Fatal error: Uncaught TypeError: app\core\form\Form::field(): Argument #1 ($model) must be of type app\core\Model, null given, called in C:\MAMP\htdocs\views
egister.php on line 30 and defined in C:\MAMP\htdocs\app\core\form\form.php:23 Stack trace: #0 C:\MAMP\htdocs\views
egister.php(30): app\core\form\Form->field(NULL, 'name') #1 C:\MAMP\htdocs\app\core\Router.php(93): include_once('C:\\MAMP\\htdocs\\...') #2 C:\MAMP\htdocs\app\core\Controller.php(8): app\core\Router->renderView('register', Array) #3 C:\MAMP\htdocs\app\controllers\authController.php(38): app\core\Controller->render('register', Array) #4 [internal function]: app\controllers\authController->register(Object(app\core\Request)) #5 C:\MAMP\htdocs\app\core\Router.php(69): call_user_func(Array, Object(app\core\Request)) #6 C:\MAMP\htdocs\app\core\Application.php(24): app\core\Router->resolve() #7 C:\MAMP\htdocs\public\index.php(26): app\core\Application->run() #8 {main} thrown in C:\MAMP\htdocs\app\core\form\form.php on line 23
Awesome series, what I most enjoy about this series is that you take us with you in your thought process about how to implement things and what the pros and cons are when you implement them. Thank you very much
Thanks for your comment. I appreciate it.