Cannot start docker container from scratch

FROM scratch is a completely empty filesystem. You have no installed libraries, and no shell (like /bin/sh) included in there. To use this as your base, you’d need a statically linked binary, or you’ll need to install all of the normal tools that are included with a linux distribution. The […]

How to use nginx to proxy to a host requiring authentication?

For example: location / { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://6.6.6.6:80; proxy_set_header Authorization «Basic a2luZzppc25ha2Vk»; } «a2luZzppc25ha2Vk» is «king:isnaked» base64 encoded, so that would work for

Laravel: Has Many Through Pivot… elegantly

Laravel Relationships pretty much cover everything that a model can access. We have One-To-One, One-To-Many, Many to Many, Polymorphic relations, etc. But there is one relation that is not covered because it’s very niche: Has Many Through Pivot. Has Many Through Pivot means: accessing a distant “one to many” relationship […]

9 Common Dockerfile Mistakes

We work with Dockerfiles on a daily basis; all the code we run for ourselves and for our customers, we run from a set of Dockerfiles. In this article, we’ll talk about what mistakes people commonly make, and how to write them better. For those of you who are Docker […]

A Complete List Of Laravel Events

One of the best features of the Laravel framework is the ability to extend or change it’s core components. And to make it even more flexible, Laravel also includes a simple observer implementation where you can subscribe to and listen for events that occur in your application. Today, I’m going […]

Laravel: Has Many Through Pivot… elegantly

Laravel Relationships pretty much cover everything that a model can access. We have One-To-One, One-To-Many, Many to Many, Polymorphic relations, etc. But there is one relation that is not covered because it’s very niche: Has Many Through Pivot. Has Many Through Pivot means: accessing a distant “one to many” relationship […]

Windows and Unix command line equivalents

This page was created on Sat Oct 09 2010 and last changed on Thu Mar 28 2019. This lists similar commands between Windows and Unix command lines. To get help on a Windows command, use the /? option, for example date /?. Windows command    Unix command    Notes arp    arp    assign    […]

Laravel 5 Eloquent appending relationships to JSON on multiple levels

If somebody is still interested in a solution for this: Laravel 5.5 introduced Api Resources which is a great way to organize the api responses. Just don’t include any relationships on your model and append them on the resource. namespace App\Http\Resources; use Illuminate\Http\Resources\Json\Resource; class UserResource extends Resource { public function […]

7 хитростей работы с моделями в Laravel

Когда впервые начинал работать с Laravel, я чувствовал, что есть много вещей, которые можно сделать лучше, когда доходило до реализации моделей. После погружения в класс Eloquent Model я обнаружил некоторые интересные вещи, значительно облегчающие работу с моделями. В этой статье я дам вам семь советов, которые должен знать каждый, использующий […]