Implement login - Part 5 | PHP MVC Framework from Scratch

preview_player
Показать описание
I have built an MVC framework on PHP from scratch.
In this video we will implement user authentication and saving authentication user in database.

⭐⭐Source code⭐⭐

Here are several features of the framework:
- Custom Routing
- Composer
- Controllers
- Views/Layouts
- Models
- Migrations
- Form widget classes
- Processing of request data
- Validations
- Registration/Login
- Simple Active Record
- Session Flash messages
- Middlewares
- Application events
- Framework reusable/installable core

=========================================================
------------------AUDIO GEAR I HAVE--------------------

------------------CHEAP AUDIO SETUP------------------
=========================================================

Follow me on social media:

Check my Github:
Рекомендации по теме
Комментарии
Автор

This series of videos are a blessing for me right now cause our teacher ask us to do an app ussing no frameworks, had no clue what to do, and this is being very helpful, thank you very much!

josesandv
Автор

Hey, isnt it unsafe to save the user.id in a session? i can manipulate the session and set the id from 1 to 2 or somethin else
or i messed something?

Douglas-Heffernan
Автор

Tq very much for providing clear cut explanation.

shaikhanuman
Автор

Quality as always, would you mind creating a tutorial about the CODE DESIGN PATTERN, or what are the common rules you follow when coding

geneartista
Автор

Thank You very much! 👍 Happy New year 🎆

twentxx
Автор

Great Video, I would also like to learn how to fetch data with an sql statement like "WHERE id > 1". I mean using other 'operators' rather than just the "=" operator as in thiy video. Also to sort the result data by Descending or Ascending order.

ngaristephen
Автор

Please help!
I have error:
GET /login - Uncaught TypeError: Typed property app\core\Application::$user must be an instance of app\core\DbModel or null, bool used

behzodjon
Автор

i tried it on php version 8 but Uncaught Error: The non-static method app\models\User::primary Key() couldn't be called.. so had to override this new syntax wherever the non-static method was called statically.

dwisusiloatmojo
Автор

hi zura.
i got some errors:
Deprecated. "Non-static method app\core\DbModel::findOne() should not be called statically".
Deprecated. "Non-static method app\core\User::tableName() should not be called statically".

should i replace the method to be statically or create an instance of User class?

el
Автор

Creating another file for login application is less sustainable. Can I do the login validation and dB in the registration model, making use of the attributes or creating another attributes and adding into the rules array, but I guess you made it not possible, cause the rules array has to return the complete keys.

olisaisama
Автор

I have one question: what does the $this->{key} syntax do? Would $this->key (without the brackets) return a different value?

jetzemeilink
Автор

array_keys() expects parameter 1 to be array, string given. $where is not considered as an array in findOne function. whenever i try to vardump $where i get string .
what should i do?

iambasanta
Автор

I need help, How can i separate user and admin login

aybeeedrys
Автор

I need help, how to set up php = <?php ?> in phpstorm ?

linhtranvan
Автор

A great video, I just have a small remark: you shouldn't give the visitor the information whether he typed a correct e-mail if he doesn't know the password. I mean that you should just display one type of error ("This combination of e-mail and password is incorrect") in all cases. I know that you did it for clarity and simplicity, but it's not really a good idea to keep it like this on a public website.

tomaskot
Автор

hi, what does it mean when I have variable in curly braces please? {$attribute}

jakubsredl
Автор

I found some issues like others also. Went thrugh video 1 2 3 4 and now im.at this 5th. I like the way it's made. And the thoughts behind it.

I found that i think the code was:
$tableName = static::tableName;

but needs to be:
$tableName = static::tableName();
as it's a method? I'm I off here? Seems to work fine for me now. With the static:tableName

bohansen
Автор

Good morning boss
Am having some series of errors with my code in this part.

Am having this errors:
Non static method User::findOne() should not be called statically. Same error for User::tableName().

I did everything the same way you did it

theJohnCode
Автор

Why did my user 'id', returned NULL

jameszayne
Автор

Do you plan to make a project with the framework?

beticohernandez