top of page
Search
  • Nov 2, 2022
  • 2 min read

Updated: Dec 14, 2022

Tasks

1

https://ss-systems.duckdns.org/login

· Address bar – route check

· Explain route – web.php

2

https://ss-systems.duckdns.org/register

· Address bar – route check

· Create user account

· Verify email


3

https://ss-systems.duckdns.org/password/reset

Forget password

· Change the password

· Login with new password


4

https://ss-systems.duckdns.org/user

User dashboard

· Address bar – route check

· From address bar change user to admin

· Mouse over all buttons

· Explain the route – web.php

· Explan userIndex in HomeController

· Explain index method – ContactController

· Explain home.blade.php

· Explain the gate method from AuthServiceProvider


5

https://ss-systems.duckdns.org/user/create

· Address bar – route check

· Mouse over buttons

· Press create button without filling the form

· Test validation - Name = number, mobile = letter, photo = .doc

· Error message and success message

· Explain create method – ContactController

· Explain store method - ContactController

· Explain create view


6

https://ss-systems.duckdns.org/user/#/edit

· Address bar – route check

· Mouse over buttons

· Check name field validation

· Check mobile field validation

· Check photo field validation

· Run update button

· Explain update method – ContactController

· Demo the orphan image

· Explain the edit view


7

https://ss-systems.duckdns.org/user/#

· Address bar – route check

· Mouse over buttons

· Press no button

· Press yes button


8

https://ss-systems.duckdns.org/admin

· Register new account

· Change the roll no =1

· Verify email

· Address bar – check route

· Explain adminIndex HomeController

· Explain route – web.php

· Explain user and role middleware

· Explain the admin-home view


Outcome

over all the demo went will, as a constructive feedback i was asked to present more fluent and consider the time.


In contacts table for mobile field i was set unique validation as below line;


'mobile' => 'required|numeric|unique::contacts, mobile',


I was looking to set unique validation for mobile field per user but the unique validation rule was apply for whole table, this way two users were not able to add same mobile number in their contact list. therefore; I have removed the unique validation and set the mobile field validation as below;


'mobile' => 'required|numeric|digits:11',


so now the mobile field is required, the input must be number, and contains 11 digits not more or less than that.


ree

Also i was advised to set the error message in a way which not expose the non existence of email in database.


 
 
 
  • Nov 1, 2022
  • 2 min read

In this project, I have created Laravel contact application and fully explained it here in the blog. I explained what development environment I have used, introduced lightly the Laravel and its tools. Then I showed how I have created Laravel project and installed Laravel/ui package with bootstrap scaffolding fronted. I have written short descriptions for important topics including authentication, authorization, eloquent ORM, model, middleware, blades, routing, with explanation as to where and why they were used in this Project. Besides authentication, I have used several methods of authorization such as Gate, middleware and I have applied authorization in CRUD methods inside ContactController. I have connected the project with database through .env file and created corresponding model for users and contacts tables, and from migration I have set the table filed and their properties. I have explained almost all the method, helper, or function that I have used throughout the project, for example in Controller, in blades or anywhere else.


At the start of the project, I did not have any skills in Laravel framework except in the coding due to having designed a website in PHP in second year of my college. However, this time I have learned a lot and now I feel more prepared, confident and ready for next project. Writing the blog contents was very effective and helpful. In terms of practical work, my Laravel skills improved as well as in writing posts and researching essential areas for my knowledge and understanding. I have gained a deeper understanding of Laravel Tools, Authentication, Authorization, Route, Middleware, Eloquent ORM, Database, email verification, and so many other important Laravel topics.


If I were to complete this project in the future, I would do it differently by choosing react scaffolding blades template and for authorization I might prefer policies rather than gates, because policies organize authorization logic around a specific model or resource. this way from one place i can apply authorization over all of the methods. Furthermore, for authentication I would prefer Jetstream instead of Laravel/ui, because Jetstream provide very good designed application scaffolding includes login, registration, email verification, tow-factor authentication, session management, API support via Laravel Sanctum, and etc. To restrict file access from direct URL, I would create file storage outside public folder. Also, I would spend more time on developing admin with crud functionality.

 
 
 

Thanks for submitting!

© 2023 by DO IT YOURSELF. Proudly created with Wix.com

bottom of page