implementing spatie laravel permission packages

preview_player
Показать описание
In this video, we'll dive into the world of Laravel permissions and explore how to implement them using the Spatie Laravel Permission package. Laravel permissions are a powerful tool for managing user roles and access levels in your web application. With the Spatie package, you can easily add permissions to your Laravel project and control access to specific parts of your application.

We'll start by installing the Spatie package and setting up the necessary database tables. Then, we'll create roles and permissions and assign them to users. We'll also explore how to use middleware to restrict access to certain routes based on user roles and permissions.

By the end of this video, you'll have a solid understanding of how to implement Laravel permissions using the Spatie package and be able to apply this knowledge to your own Laravel projects. So, if you're looking to take your Laravel application to the next level, this video is for you!

providers array
Spatie\Permission\PermissionServiceProvider::class,

12. php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider"

13. php artisan migrate

14. The vendor:publish command discussed above will also publish
the App\Providers\FortifyServiceProvider class.
You should ensure this class is registered within the providers array

15. to clear cache and other config cache
php artisan cache:clear
php artisan config:cache
php artisan route:clear
php artisan view:clear

singletion design pattern (concept)

16. vendor/laravel/fortify/routes
file where fortify makes its own routes related to user login and logout

Route::middleware('auth:web', 'verified')-group(function () {

});

18. now register a user
name : your user name
password : admin321
19. dashboard is in app\providers\RouteServiceProvider
public const HOME = '/dashboard';

#laravel
#laravel10
#laravel_development
#laravel9tutorial
#database
#laravelcourse
#laravel9
#laravel10
#mysql_workbench
#mysql

laravel
php
laravel 10
laravel with babu khan
laravel in pashto
laravel permissions
spatie laravel permissions
laravel routes
routes middle ware group
semester project laravel
degree project laravel
fortify routes
php artisan cache:clear
php artisan config:cache
php artisan route:clear
php artisan view:clear
laravel permission
singletion design pattern
laravel project
laravel tutorial
laravel ecommerce project
laravel affiliate project
laravel daily

ABOUT OUR CHANNEL
Our channel is about software development.
In this channel, you will find videos regarding
HTML, CSS, JAVASCRIPT, JQuery, Adobe Photoshop, Bootstrap,
Apache2, MySQL, PHP, LARAVEL, C++, JAVA and many more.
The main purpose of this channel is to provide quality contents with examples
regarding above mentioned topics, programming languages and tools.
Initially, videos are in pashto language.
In the near future all videos will be remade in urdu.

Check out our channel here:
Please do not forget to subscribe!

CHECK OUT OUR OTHER VIDEOS

FIND US AT

GET IN TOUCH
Babu Khan (+92-335 9144 675)

FOLLOW US ON SOCIAL
Get updates or reach out to Get updates on our Social Media Profiles!
Рекомендации по теме