Some stupid annoying things I've encountered with Livewire.
In some code examples, imagine we are building some property management platform.
Want to pass some nullable property? Is it a model? Well you better not type-hint it.
Wrong!:
<h1>Confirmation</h1> |
--- | |
name: GitHub Workflow - Laravel Unit Feature Test Private Repository Package Code Coverage Generation Artifact | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main |
<?php | |
namespace App\Charts\Generators; | |
use Illuminate\Contracts\Filesystem\Filesystem; | |
use Illuminate\Support\Facades\Storage; | |
use Spatie\TemporaryDirectory\TemporaryDirectory; | |
use Spatie\Browsershot\Browsershot; | |
use App\Models\Article; | |
use App\Models\Asset; |
<?php | |
namespace App\Charts; | |
use Spatie\DataTransferObject\DataTransferObject; | |
use Illuminate\Support\Collection; | |
class HorizontalBarChart extends DataTransferObject | |
{ | |
public const MEASUREMENT_RELATIVE = 'relative'; |
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Http\Request; | |
use Illuminate\Http\Response; | |
use Illuminate\Support\Facades\Storage; | |
use Illuminate\Support\Str; | |
use Imgproxy\UrlBuilder; |
# build | |
# docker build --force-rm --tag=alistaircol/tcv . | |
# run | |
# docker run --rm -it -p 9999:80 alistaircol/tcv:latest | |
FROM node:16-alpine AS build | |
WORKDIR /usr/src/app | |
RUN npm install tailwindcss tailwind-config-viewer; \ | |
npx tailwindcss init --jit --full; \ | |
npx tailwind-config-viewer export tcv-out |
<?php | |
namespace App\Providers; | |
use Event; | |
use Illuminate\Console\Events\CommandStarting; | |
use Illuminate\Database\Events\MigrationsEnded; | |
use Illuminate\Support\ServiceProvider; | |
class CommandListenerProvider extends ServiceProvider |
# docker run --rm -v $(pwd):/data cytopia/yamlfmt -w docker-compose.yml | |
version: '3.4' | |
services: | |
mailhog: | |
image: mailhog/mailhog:latest | |
ports: | |
- 1025:1025 | |
- 8025:8025 | |
minio: |
resource "graylog_input" "syslog_udp" { | |
title = "syslog" | |
type = "org.graylog2.inputs.syslog.udp.SyslogUDPInput" | |
global = true | |
attributes = jsonencode({ | |
bind_address = "0.0.0.0" | |
port = 514 | |
recv_buffer_size = 262144 | |
decompress_size_limit = 8388608 |