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 | |
# Stop all containers. | |
docker stop $(docker ps -a -q) | |
# Delete all containers. | |
docker rm $(docker ps -a -q) | |
# Delete all images. | |
docker rmi --force $(docker images -q) |
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 | |
//example: | |
$query = Foo::where('id', '=', 1)->where('name', '=', 'bar'); | |
//would produce the following raw query: | |
//select * from foo where id = ? and name = ?; | |
dd(vsprintf(str_replace('?', '%s', $query->toSql()), collect($query->getBindings())->map(function($binding){ | |
return is_numeric($binding) ? $binding : "'{$binding}'"; |