Skip to content

Instantly share code, notes, and snippets.

Vitor Faiante vitorf7

Block or report user

Report or block vitorf7

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
vitorf7 / binder.php
Created Aug 14, 2019 — forked from arodbits/binder.php
Combine binding values into a raw SQL query in Laravel. Debugging in Laravel.
View binder.php
$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}'";
vitorf7 /
Created Mar 7, 2018 — forked from ericmdev/
Docker - stop and remove all containers and images.
# 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)
vitorf7 / Test.php
Last active Aug 29, 2015
Laravel 5 Testing with Authentication using L5 Helper Methods
View Test.php
// === Inside my ApiTester.php Class. Could be inside the same test class but I use this for methods to test my API === //
* Set Up Method for Tests
public function setUp()
You can’t perform that action at this time.