Skip to content

Instantly share code, notes, and snippets.

View imjonos's full-sized avatar
🎯
Focusing

Eugeny Nosenko imjonos

🎯
Focusing
View GitHub Profile
@imjonos
imjonos / TestUuid.php
Last active January 14, 2023 15:57
LARAVEL UUID AS PRIMARY KEY
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Support\Str;
/**
@imjonos
imjonos / SearchPosts.php
Created January 13, 2023 14:01
Livewire Test
<?php
namespace App\Http\Livewire;
use App\Services\PostService;
use Illuminate\Contracts\Container\BindingResolutionException;
use Illuminate\Contracts\View\View;
use Livewire\Component;
final class SearchPosts extends Component
@imjonos
imjonos / index.html
Last active January 14, 2023 15:59
demo js worker
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Test with worker</title>
<script defer src="main.js"></script>
</head>
<body>
<h1>This is the test with worker!</h1>
<div>
@imjonos
imjonos / mysql,txt
Last active October 6, 2021 13:19
Test Task
1) Show Stores, that have products with Christmas, Winter Tags
SELECT Store.* FROM Store
LEFT JOIN Product ON Store.id = Product.store_id
LEFT JOIN TagConnect ON Product.id = TagConnect.product_id
LEFT JOIN Tag ON Tag.id = TagConnect.tag_id
WHERE Tag.tag_name in ('Christmas', 'Winter')
GROUP BY Store.id
2) Show Users, that never bought Product from Store with id == 5