Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

“Invest in yourself — your confidence is always worth it.”

Explore Cosmetic Hospitals

Start your journey today — compare options in one place.

How to Use Middleware In Laravel.

step:1– first, you have go this path: C:\xampp\htdocs. then you have right-click on the git base here. same as this pic.

Step:2- write any project name like that.

Step:3– composer create-project –prefer-dist laravel/laravel tutrial

Strep:3– and press the Enter .it will take a few minutes for installing this project.

Step:4– edit .env file and put your database name credentials in it.

Step:5- go to your users’ table migration file and add one more field called isAdmin, and its data type is boolean.

Step:6- Now run the following command. php artisan migrate

Step:7- The next step is to create Authentication functionality. php artisan make:auth

it will be shown: So the auth scaffold will generate successfully.

Step:8-just write php artisan serve and press enter than go this url: http://127.0.0.1:8000/

Step:9- Create one middleware by typing following Laravel Command.

Step:10- go to this directory.  app >> Http >> middleware >> admin.php

Step:11- you have to go this path :  app  >>  Http  >>  Kernel.php

Step:12- you have added our custom middleware called admin.

Step:13-you have to resources>>view>>home.blade.php

Step:14- you have to HomeController.

Step:15– Create one admin.blade.php

Step:16-than you have to go into a database.

and run this command php artisan serve. and go on url: http://127.0.0.1:8000/

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
sam
MotoShare.in is your go-to platform for adventure and exploration. Rent premium bikes for epic journeys or simple scooters for your daily errands—all with the MotoShare.in advantage of affordability and ease.

Related Posts

What is Laravel and use cases of Laravel?

What is Laravel? Laravel is an open-source, free PHP web framework designed for the development of web applications following the model-view-controller (MVC) architectural pattern. It was generated…

Read More

Complete guide of Laravel certification courses, tutorials & training

What is Laravel Laravel is a reliable and simple to use open-source PHP framework. It adheres to the model-view-controller pattern of design. Laravel makes use of pre-existing…

Read More

Top 100 laravel interview questions and answers

1) What is Laravel? Laravel is an open-source widely used PHP framework. The platform was intended for the development of web application by using MVC architectural pattern….

Read More

[SOLVED] Laravel : Supervisor FATAL/BACKOFF Exited too quickly (process log may have details)

Problem I’m trying to use Laravel queues with a supervisor but the service is not working properly. When I try to check status:$ sudo supervisorctl status$ laravel-worker:laravel-worker_00:…

Read More

How to Login with Token in Laravel PHP Framework?

How to Login with Token in Laravel PHP Framework? Step 1. Create a new Project, so write down the following command on Git Bash: Step 2. Move…

Read More

Directory Structure Of Laravel Application

devopsschool – This is Project Folder app – The app directory contains the core code of your application. bootstrap – The bootstrap directory contains the app.php file…

Read More