React Router Create Protected Route

Protected / Private Routing is helpful in case of backend development with ReactJs. Or we can say only authenticated users can only access the particular route. We can make a protected/private route with React Router Dom package. I am using React Router 5.x.

Read More

Understanding Laravel Middleware

Middleware in Laravel is a bridge between all the requests and responses. Or we can say that all the requests entering your application can be filtered by middlewares. Laravel has fewer built-in middleware such as VerifyCsrfToken. The VerifyCsrfToken middleware will check the CSRF Token on each and every POST requests and through an error if the CSRF Token missed or mismatched.

Read More

REST API and Passport Authentication with Laravel

REpresentational State Transfer or REST is an architectural style for providing standards between computer systems on the web. We need REST API’s to communicate over various mediums like web, desktop or mobile application through the same database. API’s do not maintain session state between requests, except use tokens to authenticate users requests.

Read More

Custom Validation With Laravel

Laravel provides a variety of validation rules that improve productivity. We can easily manage and customize the validation as per the requirement. You can also use the Rule class while defining the validation rules. Let’s use the exits validation rule.

Read More

Laravel Form Validation with example

There are a bunch of ways to handle Form Validation through Laravel. It just depends on the developer. The robust ways to form validation is by creating a form request by the artisan command. It will help to separate the validation logic from the controller. Another way is by adding manual validatation rules within the method.

Read More