Team Role Middleware For Laravel Spark
Makes it simple to use Spark's role feature on routes
Route::group(['middleware'=>'role:owner'], function(){
// owners only
});
Route::group(['middleware'=>'role:member'], function(){
#!/usr/bin/env php | |
<?php | |
echo "Running tests.. "; | |
exec('vendor/bin/phpunit', $output, $returnCode); | |
if ($returnCode !== 0) { | |
// Show full output | |
echo PHP_EOL . implode($output, PHP_EOL) . PHP_EOL; | |
echo "Cannot push changes untill tests are OK.." . PHP_EOL; | |
exit(1); | |
} |
#!/usr/bin/env php | |
<?php | |
echo "Running tests.. "; | |
exec('vendor/bin/phpunit', $output, $returnCode); | |
if ($returnCode !== 0) { | |
// Show full output | |
echo PHP_EOL . implode($output, PHP_EOL) . PHP_EOL; | |
echo "Aborting commit.." . PHP_EOL; |
FROM php:7.0.12-apache | |
ENV DEBIAN_FRONTEND=noninteractive | |
# Install the PHP extensions I need for my personnal project (gd, mbstring, opcache) | |
RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev libpq-dev git mysql-client-5.5 wget \ | |
&& rm -rf /var/lib/apt/lists/* \ | |
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \ | |
&& docker-php-ext-install gd mbstring opcache pdo zip |
# Installation | |
As far as I know this is how to get Passport on Laravel Spark working correctly, it works so far for me over the API but there might be something I am still missing. | |
I am using the following software versions in composer.json: | |
``` | |
"require": { | |
"php": ">=5.6.4", | |
"laravel/framework": "5.3.*", |
#!/bin/bash | |
# Script to simplify the release flow. | |
# 1) Fetch the current release version | |
# 2) Increase the version (major, minor, patch) | |
# 3) Add a new git tag | |
# 4) Push the tag | |
# Parse command line options. | |
while getopts ":Mmpd" Option |
#!/bin/bash | |
DYNAMODB_USER=vagrant | |
sudo apt-get install openjdk-7-jre-headless -y | |
cd /home/${DYNAMODB_USER}/ | |
mkdir -p dynamodb | |
cd dynamodb |
#!/bin/bash | |
sudo add-apt-repository -y ppa:git-core/ppa | |
sudo apt-get update | |
sudo apt-get install git -y |
<?php // Simple PHP script to lookup for blacklisted IP against multiple DNSBLs at once. ?> | |
<html> | |
<head> | |
<title>DNSBL Lookup Tool - IP Blacklist Check Script</title> | |
</head> | |
<body> | |
<h2>IP Blacklist Check Script</h2> | |
<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post"> | |
<input type="text" value="" name="ip"/> | |
<input type="submit" value="LOOKUP"/> |
Makes it simple to use Spark's role feature on routes
Route::group(['middleware'=>'role:owner'], function(){
// owners only
});
Route::group(['middleware'=>'role:member'], function(){
# Set composer folder for this command and update | |
commands: | |
01updateComposer: | |
command: export COMPOSER_HOME=/root && /usr/bin/composer.phar self-update | |
option_settings: | |
# Add environment variable to set composer home folder | |
- namespace: aws:elasticbeanstalk:application:environment | |
option_name: COMPOSER_HOME | |
value: /root |