Pyae Sone Aung Blog

website·Indexed 31 days ago

https://pyaesoneaung.dev

A professional web developer's blog featuring tutorials and guides on Laravel, PHP package development, and modern web tools. Topics include Filament CMS, Laravel Zero, Laravel Envoy, Tailwind CSS JIT mode, and building AI agents with Neuron AI.

Tokens
19.5K
Snippets
134
Records
150
Agent score
62%

What's inside Pyae Sone Aung

  1. Overview of Filament TALLkit

    Filament is a TALL stack (Tailwind CSS, Alpine.js, Laravel, Livewire) toolkit used to build powerful admin panels. It provides a comprehensive Form Builder and Table Builder, allowing developers to create modern, aesthetically pleasing administrative interfaces quickly. By leveraging Filament, developers can reduce the time spent on UI boilerplate and focus more on implementing core business logic.
  2. Scale Laravel architecture for high request volume

    To handle high traffic (e.g., 2,000 requests per second), implement a load balancing architecture where a Load Balancer distributes incoming traffic across multiple small web servers. To ensure data consistency across these web servers, use centralized MySQL and Redis instances. For real-time features requiring high connection counts (e.g., 51K connections), implement a dedicated Socket server.
  3. Modernize PHP code with SHIFT Workbench automation tasks

    SHIFT Workbench provides over 60 automation tasks to modernize Laravel and PHP codebases. It can be used to automatically refactor legacy syntax into modern PHP versions, sort CSS classes, and handle project upgrades.
  4. Initialize a PHP package project with Composer

    To start a new PHP package, use composer init to create the project structure and composer.json file. Key configuration settings include:

    • Package Name: Use the format <vendor>/<name> (e.g., pyaesoneaung/quiz-api-client).
    • Package Type: Set to library for reusable packages.
    • Minimum Stability: Set to dev if you need to allow development versions of dependencies.
    • Autoloading: Use PSR-4 mapping to link a namespace (e.g., PyaeSoneAung\QuizApiClient\) to the src/ directory.
    mkdir quiz-api-client
    cd quiz-api-client
    composer init
  5. Configure Laravel version requirements and dev dependencies

    Define the minimum supported Laravel versions using illuminate/contracts. For testing, use orchestra/testbench, which provides the necessary Laravel core classes (ServiceProviders, Facades) for development and IDE auto-completion.

    • orchestra/testbench ^9.0 is for Laravel 10.
    • orchestra/testbench ^10.0 is for Laravel 11.
    "require": {
      "illuminate/contracts": "^10.0|^11.0",
      "pyaesoneaung/quiz-api-client": "^1.0"
    },
    "require-dev": {
      "orchestra/testbench": "^9.0|^10.0"
    }