PowerShell:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform
| <?php | |
| namespace App\Http\Middleware; | |
| use Closure; | |
| use Illuminate\Http\Request; | |
| class ValidationResponseWithRuleName | |
| { | |
| /** |
| # NOT FOR SHELL SCRIPT, but rather just for quick copy paste | |
| # this is a copy-paste version with defaults of the full shell script docker-xenial.sh which is below this one in gist. | |
| apt-get -y install apt-transport-https ca-certificates curl && \ | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && \ | |
| add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" && \ | |
| service lxcfs stop && apt-get remove -y -q lxc-common lxcfs lxd lxd-client && \ | |
| apt-get update -q && \ | |
| apt-get install -y -q docker-ce && \ | |
| printf '{ "userns-remap" : "default" , "storage-driver" : "overlay2" }' > /etc/docker/daemon.json && \ |
#Laravel 5 Simple ACL manager
Protect your routes with user roles. Simply add a 'role_id' to the User model, install the roles table and seed if you need some example roles to get going.
If the user has a 'Root' role, then they can perform any actions.
Simply copy the files across into the appropriate directories, and register the middleware in App\Http\Kernel.php
| <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); | |
| /* | |
| Manage multiple hostnames (domains, sub-domains) within a single instance of CodeIgniter. | |
| Example: | |
| If you had the following domain/sub-domain style for your site: | |
| your-domain.com |
This gist assumes: