Laravel Authorization: Authorization libraries supporting ACL, RBAC, ABAC and other models

Laravel Authorization Be based on Casbin It is an authorization library that supports access to multiple access control models (such as ACL, RBAC, ABAC, etc.).Before that, you need to know Casbin. install Use Composer to install: composer require casbin/laravel-authz Lauthz LauthzService Provider is auto-discovered and registered by default, bu ...

Posted on Mon, 14 Oct 2019 01:09:27 -0700 by fernyburn

laravel5.6 Custom Background (Administrator) Logon

It can be achieved by using Laravel's own login and modifying it. Run the command line: php artisan make:auth First, we need to determine the data needed for login. I use the account encryption number (for example): 1. Create the admins data table and add the field id name number password. pu ...

Posted on Wed, 09 Oct 2019 23:14:24 -0700 by tzikis

Laravel event listener + queue asynchronous processing

Preface Seeing that the company's API uses the event listener + queue approach to asynchronous processing, so a little research is done on the implementation of the observer pattern in Laravel. In my case, I can't see the advantages, maybe it feels a bit complicated, but there are many real applica ...

Posted on Fri, 04 Oct 2019 20:00:31 -0700 by Darghon

Docker deploys Laravel applications

This article uses PHP basic mirroring: php:7.3-apache The Laravel version of this article is: laravel:5.8.* I. Preparing our Laravel application # Run the mix command to package js, css, img files. If you don't use mix, you can omit this step. npm install npm run production # Installing dependencies in composer.lock composer install --ignor ...

Posted on Tue, 01 Oct 2019 17:06:52 -0700 by Pavlos1316

What did Lao Wang do with you in the routing matching process of Source | Laravel?

Laravel has a number of routing configurations, including domain name settings, request protocols, request modes, and request paths.So what does Laravel do to match routes after getting requests? This article explains the source code of Laravel 5.8 and shows you the source code step by step. There are four validators for Laravel default routes, ...

Posted on Thu, 26 Sep 2019 18:18:23 -0700 by five

Use PHP Traits to encapsulate Laravel Eloquent associations

The article was forwarded from the professional Laravel developer community with the original link: https://learnku.com/laravel/t... I recently refactored the code for a project, and I found myself writing the same method on the Eloquent model to define the association relationship of the Account class.For reference only, I prefer to use gett ...

Posted on Tue, 24 Sep 2019 19:02:19 -0700 by fowlerlfc

Laravel Model Associations Basic Tutorial

The article was forwarded from the professional Laravel developer community with the original link: https://learnku.com/laravel/t... Defining model associations in Laravel is something every Laravel developer may have done more than once.However, you may encounter various problems when trying to achieve associations.Because Laravel has all so ...

Posted on Mon, 16 Sep 2019 19:23:27 -0700 by catgurl_ashley

Role and permission control in spatie/Laravel-permission Laravel applications

The article was forwarded from the professional Laravel developer community with the original link: https://learnku.com/laravel/t... Associate users with roles This package allows you to manage user privileges and roles in the database. When you install the extension pack, you can do this: // Add a privilege to the user $user->givePermissio ...

Posted on Fri, 06 Sep 2019 19:02:41 -0700 by krabople

Use query constructor in Laravel to implement add, delete and change checking

Introduction The last article introduced how to run a laravel project in windows environment. This article describes how to use the query constructor in laravel to add, delete and modify. When reading this article, I acquiesce that you already have the following knowledge: Understanding the basic syntax of php Understanding database design Und ...

Posted on Thu, 05 Sep 2019 05:01:17 -0700 by Nameless12

Create Laravel project and push it to gitlab

Today, we have opened a new project to sum up: 1. Create a Laravel project 1.1 There are generally two ways to create, composer command line and PHP-Storm editor.( https://www.jianshu.com/p/0941dcfc939a There are two composer modes, Via Laravel Installer and Via Composer Create-Project.( https://laravel.com/docs/5.7 Here we use the second. ...

Posted on Thu, 20 Jun 2019 11:56:15 -0700 by anticore