Moved this snippet to a dedicated repository: https://github.com/fastvoid/laravel-dutch-validation
This file contains hidden or 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 | |
declare(strict_types=1); | |
namespace ApiPlatform\Workflow\PathResolver; | |
use ApiPlatform\Core\PathResolver\OperationPathResolverInterface; | |
final class OperationPathResolver implements OperationPathResolverInterface | |
{ |
This file contains hidden or 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 YourName\YourBundle\EventListener; | |
use Doctrine\ORM\Event; | |
use Symfony\Component\DependencyInjection\ContainerAware; | |
class EntityListener extends ContainerAware | |
{ |
This file contains hidden or 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
# Inlude in your .zshrc | |
removecontainers() { | |
docker stop $(docker ps -aq) | |
docker rm $(docker ps -aq) | |
} | |
armageddon() { | |
removecontainers | |
docker network prune -f |
This file contains hidden or 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 Tests; | |
use GuzzleHttp\Client; | |
trait MailtrapTrait | |
{ | |
public $mailtrap; | |
protected $mailtrap_inbox; |
This file contains hidden or 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 | |
use Symfony\Component\HttpFoundation\File\UploadedFile; | |
trait SimpleUploadTrait { | |
/** | |
* Upload the file with slugging to a given path | |
* | |
* @param UploadedFile $image |
This file contains hidden or 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/sh | |
# Laravel 5 new project setup bash script. | |
# Inspired by Mitchell van Wijngaarden | |
# Extended by John in 't Hout | |
projectname=$1 | |
git clone -o laravel -b develop https://github.com/laravel/laravel.git ${projectname} >/dev/null | |
cd ${projectname} | |
git checkout --orphan master |