Avatar 💻

recca0120 Tech Notes

Software Developer / Tech Notes

  1. Home
  2. Archives
  3. Categories
  4. Tags
  5. Search
  6. About
    1. Dark Mode

Archives

2026 49
2024 3
2023 11
2022 13
2020 15
More

Categories

PHP Laravel Testing Frontend DevOps Database Tools Python AI MacOS

Tags

Laravel Php Testing Javascript PHPUnit Sqlite Python Typescript Ai-Agent Claude-Code Composer Linux Aws Blade Developer-Tools Devops Docker Guzzle MCP Mockery
Featured image of post 3 Ways to Eliminate Duplicate HTML Blocks in Blade Templates
Laravel PHP

3 Ways to Eliminate Duplicate HTML Blocks in Blade Templates

When Blade templates have repeating HTML, choose from @include, Component, or ob_start. ob_start is the only option that requires no additional template files.

2024 年 5 月 7 日
正體中文
Laravel Blade
Featured image of post Alpine.js Plugin for Laravel AJAX Validation Errors
Frontend Laravel

Alpine.js Plugin for Laravel AJAX Validation Errors

Build an Alpine.js errors plugin that mirrors the Laravel MessageBag API, so 422 AJAX validation errors display just as easily as the @error directive.

2024 年 4 月 19 日
正體中文
Alpine.js Laravel Javascript Validation
Featured image of post Laravel Vite Assets Fail on Custom Domain? Set server.host
Laravel Frontend

Laravel Vite Assets Fail on Custom Domain? Set server.host

Laravel Vite defaults to localhost, breaking assets on custom domains. Set server.host and server.hmr.host in vite.config.js, or use valetTls for Valet HTTPS.

2023 年 3 月 20 日
正體中文
Laravel Vite
Featured image of post Get Package Versions at Runtime with Composer 2
PHP

Get Package Versions at Runtime with Composer 2

Use Composer 2's InstalledVersions::getVersion() to check package versions at runtime for feature flags or compatibility — no lock file parsing required.

2023 年 2 月 25 日
正體中文
Php Composer
Featured image of post Laravel 10 Database Expression: Cross-Database SQL
Laravel Database

Laravel 10 Database Expression: Cross-Database SQL

MySQL's IF() fails on SQLite. Laravel 10's Expression interface generates Grammar-specific SQL, encapsulating cross-database differences into a reusable class.

2023 年 2 月 20 日
正體中文
Laravel MySQL Sqlite Testing
Featured image of post Add MySQL Functions to SQLite in Laravel Tests
Laravel Database

Add MySQL Functions to SQLite in Laravel Tests

SQLite throws "no such function" for MySQL-specific functions like FIELD. Use PDO sqliteCreateFunction in TestCase setUp to register them and make tests pass.

2023 年 2 月 17 日
正體中文
Laravel Sqlite Testing
Featured image of post Eloquent Macro: Fire Specific Events After saveQuietly
Laravel PHP

Eloquent Macro: Fire Specific Events After saveQuietly

Save a model silently with saveQuietly, then selectively dispatch created or other Eloquent model events via a custom Builder macro fire method in Laravel.

2023 年 1 月 20 日
正體中文
Laravel Eloquent
Featured image of post Fix S3 UnableToCheckFileExistence 403 Error in Laravel
Laravel DevOps

Fix S3 UnableToCheckFileExistence 403 Error in Laravel

Without s3:ListBucket in the IAM policy, S3 returns 403 for missing files, making [Flysystem](https://flysystem.thephpleague.com) throw UnableToCheckFileExistence. Adding the permission resolves it.

2023 年 1 月 19 日
正體中文
Laravel Flysystem Aws
Featured image of post Fix gRPC "Waiting for thread pool to idle" in PHPUnit
PHP Testing

Fix gRPC "Waiting for thread pool to idle" in PHPUnit

PHPUnit prints "Waiting for thread pool to idle before forking" when the gRPC extension is too new. Downgrade grpc to 1.49.0 to eliminate the warning.

2023 年 1 月 18 日
正體中文
Php PHPUnit
Featured image of post Install Docker CE on WSL2 Without Docker Desktop
DevOps Windows

Install Docker CE on WSL2 Without Docker Desktop

Install Docker CE in WSL2 without Docker Desktop: add your user to the docker group to run without sudo and enable systemd for automatic Docker startup on boot.

2023 年 1 月 15 日
正體中文
Docker WSL2 Linux
1 2 3 4 5 6 7 8 9 10
© 2020 - 2026 recca0120 Tech Notes
recca0120 on GitHub
Built with Hugo
Theme Stack designed by Jimmy