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
import json | |
import subprocess | |
def handler(event, context): | |
result = subprocess.run([ | |
'php', | |
'index.php', | |
json.dumps(event), | |
json.dumps(context)], | |
stdout=subprocess.PIPE, |
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 | |
namespace App\Http\Middleware; | |
use Carbon\Carbon; | |
use Closure; | |
class PrivateResponse | |
{ | |
/** |
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
echo "Install mailcatcher" | |
sudo apt-add-repository ppa:brightbox/ruby-ng | |
sudo apt-get update | |
sudo apt-get -y install ruby2.3 ruby2.3-dev | |
sudo gem install mailcatcher | |
mailcatcher --ip=0.0.0.0 |
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 | |
namespace App; | |
trait QueryRelationships | |
{ | |
public function scopeWhereHasRelationIds($query, $relationName, array $relationIdList) | |
{ | |
$query->whereHas($relationName, function ($query) use ($relationIdList) { | |
$query->whereIn('id', $relationIdList) |