Skip to content

Instantly share code, notes, and snippets.

@jarektkaczyk
jarektkaczyk / default.conf
Created December 16, 2018 00:33
NGiNX Configuration for Vue-Router in HTML5 Mode
server {
listen 80 default_server;
listen [::]:80 default_server;
root /your/root/path;
index index.html;
server_name you.server.com;
@jarektkaczyk
jarektkaczyk / tags.php
Last active May 6, 2018 08:11 — forked from AdrianKuriata/tags.php
This is optimization tags for ManyToMany relationship with Post model for attaching not existing tags.
public function store(Post $post)
{
$tags = [];
foreach ((array) request('tags') as $tag_name) {
$tags[] = Tag::firstOrNew(['name' => $tag_name]);
}
// a dla fanow adama wathana o jedna linijke mniej:
//