This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
require 'json' | |
require 'yaml' | |
VAGRANTFILE_API_VERSION ||= "2" | |
confDir = $confDir ||= File.expand_path(File.join(Dir.home, ".homestead")) | |
homesteadYamlPath = confDir + "/Homestead.yaml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
NOW=$(date +%Y%m%d%H%M) | |
USER="MYSQL_USERNAME" | |
PASSWORD="MYSQL_PASSWORD" | |
FOLDER="/home/vagrant/Projects/_dbdumps/" | |
cd $FOLDER | |
mkdir -p $NOW |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
require 'yaml' | |
VAGRANTFILE_API_VERSION = "2" | |
confDir = $confDir ||= File.expand_path("~/.homestead") | |
homesteadYamlPath = confDir + "/Homestead.yaml" | |
homesteadJsonPath = confDir + "/Homestead.json" | |
afterScriptPath = confDir + "/after.sh" | |
aliasesPath = confDir + "/aliases" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Will pass if the logged in user has access to | |
* one of the given permissions using Gate::allows. | |
* Usage: | |
* | |
* | |
* @canone('update-company','company-admin') | |
* <a href="{{ route('admin.companies.edit', [$company->id]) }}" class="btn btn-smal btn-primary">Modify</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Validate exists_or_null | |
* This rule validates exactly like the default 'exists' rule, except it passes | |
* when the value is equal to 0 or null. The function should be added to the | |
* boot method of the AppServiceProvider. When there's another value than | |
* 0 or null, the value will be validated against the default exists | |
* rule. | |
*/ | |
Validator::extend( | |
'exists_or_null', |