Best of PHPJanuary 2025

  1. 1
    Article
    Avatar of laravelkidsLaravel Kids·1y

    Best Design Pattern source for Learning

    Refactoring Guru provides comprehensive resources for learning design patterns in PHP. The site includes detailed explanations, examples, and practical advice for implementing various patterns in real-world projects. Ideal for anyone looking to enhance their software design skills.

  2. 2
    Article
    Avatar of communityCommunity Picks·1y

    deepseek-php/deepseek-laravel: Laravel wrapper for Deepseek PHP client, to seamless deepseek API integration with laravel applications.

    This post introduces a Laravel wrapper for the Deepseek PHP client, enabling seamless API integration with Laravel applications. It provides instructions on installation via Composer, adding the API key to the .env file, and basic and customized ways to use the Deepseek client. Additionally, it mentions the testing phase, contributors, and the project's changelog. The package is available under the MIT License.

  3. 3
    Video
    Avatar of primeagenThePrimeTime·1y

    So I Tried Laravel

    The author, with limited prior experience in PHP and frameworks, embarks on a journey to learn Laravel, aiming to build a microblogging platform called Chirper. Highlights include setting up Laravel, understanding Blade and Livewire, configuring controllers, migrations, and views. The focus is on getting started with Laravel, understanding its components, and working through its features step-by-step.

  4. 4
    Article
    Avatar of lnLaravel News·1y

    Optimizing Large Data Delivery with Laravel Streaming Responses

    Laravel's streaming responses allow efficient handling of large datasets by sending data incrementally, reducing memory usage and improving response times. This approach is demonstrated with practical examples of streaming large data exports, highlighting memory efficiency and immediate feedback to users.

  5. 5
    Article
    Avatar of communityCommunity Picks·1y

    tnylea/php-ext: A chrome extension to show PHP (Laravel) devtools console

    A Chrome extension named php-ext allows users to iframe a PHP console using Spatie's Laravel Web Tinker package. By following a series of steps, users can load this extension in Chrome's developer tools and execute Laravel/PHP code directly from the console.

  6. 6
    Article
    Avatar of lnLaravel News·1y

    Laravel Backup Server v4 Released as Open Source

    Spatie has released Laravel Backup Server v4 as an open-source package. Initially a paid offering, it backs up multiple servers, employs hard link deduplication, allows for file search within backups, automates cleanup of old backups, monitors backup health, and provides notification of issues. It requires Laravel v10 or v11, PHP 8.2, rsync v3 or higher, and the ext3/ext4 filesystem. The package is available on GitHub.

  7. 7
    Article
    Avatar of tightencoTighten·1y

    Filament Crash-Course: Create a Customizable Admin Panel in Minutes

    A quick guide to creating a customizable admin panel using the Filament toolkit in Laravel. It covers installation, setup, and generating CRUD resources to manage models like products, categories, features, and reviews. The tutorial emphasizes using Filament's features to rapidly build user-friendly interfaces and highlights the ease of customizing forms and tables.

  8. 8
    Article
    Avatar of lnLaravel News·1y

    Interactive Console Commands in Laravel

    Handling missing or incorrect user input in Laravel command-line tools can be addressed using the PromptsForMissingInput trait. This trait turns standard Artisan commands into interactive dialogues, ensuring accurate and user-friendly interface for tasks like maintenance, deployment, or database backups. The post provides practical examples that demonstrate how to implement interactive prompts.

  9. 9
    Article
    Avatar of lnLaravel News·1y

    Laravel SpaceOCR: Parse Images and Multi-page PDFs in Laravel

    The Laravel OCR Space package allows users to integrate the OCRSpace API for parsing images and multi-page documents into JSON using Optical Character Recognition. The package simplifies interaction with the API and requires an ORCSpace API account. It offers various account tiers, including a free option.

  10. 10
    Video
    Avatar of aarondfrancisAaron Francis·1y

    I built a GUI in the terminal (with PHP)

    The post details the creation of a Textual User Interface (TUI) in the terminal using PHP for Laravel. The application, named Solo, is designed to manage every command needed for running a Laravel application, featuring scroll bars, tabs, and popups. Solo allows for tasks like tailing logs, running various commands, and managing vendor frames with hotkeys and an interactive mode. It's highly configurable and includes features like lazy commands that don’t auto-start but are available when needed.

  11. 11
    Article
    Avatar of laravelkidsLaravel Kids·1y

    Implement RBAC with Laravel

    Briefly introduces an effective method for implementing Role-Based Access Control (RBAC) in Laravel and includes a helpful YouTube tutorial link.

  12. 12
    Article
    Avatar of lnLaravel News·1y

    Optimizing Factory Data Creation with Laravel's recycle Method

    Laravel's factory system now includes the recycle method, which enhances efficiency by reusing model instances across multiple factory calls. This feature is useful for creating complex data structures with shared relationships, significantly improving performance. A practical example is provided to demonstrate how to generate sales reports in an e-commerce environment by recycling categories and products.

  13. 13
    Article
    Avatar of jetbrainsJetBrains·1y

    PHP Annotated – January 2025

    This edition covers major updates in the PHP community, including the release of PHP 8.4 with new features, performance improvements, and debugging enhancements. It highlights the transition of PHP 8.2 to a security-fixes-only phase, and the release of new tools and versions such as PHPStan 2.0, Rector 2.0, and FrankenPHP 1.3. The PHP Foundation's contributions and the addition of code examples on php.net are also mentioned. Upcoming PHP conferences and interesting reads on PHP topics round out the update.

  14. 14
    Article
    Avatar of netteNette·1y

    Architecture That Grows with Your Project

    Proper code organization is a common challenge in PHP application development, and Nette documentation provides a comprehensive guide to directory structure. It discusses the benefits of a domain-oriented structure, making it easier to understand an application's purpose at a glance. The guide also offers principles to help evolve the structure as projects grow, making it useful for both new and existing projects.

  15. 15
    Article
    Avatar of lnLaravel News·1y

    A Laravel Package to Use the Deepseek API With V3 AI Models

    The DeepSeek Laravel package wraps the community-driven PHP client library for integration with the DeepSeek v3 AI models, which offers significant speed improvements. It supports fluent method chaining, customization of models and query roles, and complies with PSR-18. Detailed installation instructions and source code can be found on GitHub.

  16. 16
    Article
    Avatar of laravelkidsLaravel Kids·1y

    Laravel Roadmap Learning Path

    A comprehensive learning path is available for those looking to master Laravel. This roadmap provides a structured approach to learning Laravel, from basics to advanced topics, with recommended resources and guidelines to follow.

  17. 17
    Article
    Avatar of laraveldevLaravel Dev·1y

    Understanding the Laravel Request Lifecycle (Laravel 11)

    Understand the Laravel Request Lifecycle (Laravel 11) to build scalable and maintainable applications. This knowledge is crucial for both beginners and expert developers.

  18. 18
    Article
    Avatar of last9Last9·1y

    How to Use the Laravel Scheduler for Task Management

    The Laravel Scheduler automates and manages repetitive tasks in an application using a simple syntax built on top of the Cron system. It supports various scheduling options, handles error logging, allows conditional execution of tasks, and integrates with third-party monitoring tools. Advanced features include task output logging, dynamic schedules, and combining tasks with Laravel Queues. The Scheduler ensures no task overlaps and can be configured to run tasks on a single server in a multi-server setup. It also offers task hooks for actions before and after task execution. The Laravel Scheduler is highly flexible, improving efficiency and maintaining smooth operations, even during maintenance modes.

  19. 19
    Article
    Avatar of lnLaravel News·1y

    Laravel Rewind is a Versioning Package for Eloquent

    Laravel Rewind is a versioning package for Eloquent models, allowing partial diffs and full snapshots of model data. It offers features like rewinding to specific versions, fast-forwarding, thread safety, and cloning models at specific versions. Installation is done via Composer with specific artisan commands.

  20. 20
    Article
    Avatar of lnLaravel News·1y

    Manage Metadata on Laravel Eloquent Models with JSON Support

    The Laravel Model Metadata package enables easy management of metadata in Eloquent models with JSON support for various data types. It supports operations for creating, updating, deleting, and querying metadata. The package features include managing both single and multiple metadata records for a model and includes methods for JSON casting and a polymorphic table design.

  21. 21
    Article
    Avatar of lnLaravel News·1y

    Immutable Value Objects in PHP and Laravel With the Bags Package

    The Bags package in PHP and Laravel helps create immutable value objects, providing type safety, data casts, and built-in validation. It can replace regular arrays in your code to enhance data encapsulation. The package integrates with Laravel's Collection and Validation features and supports Eloquent casts and injecting validated Bag objects into controllers. Key features include immutability, strong typing, value casting, collection support, and composability. The package also includes an Artisan command to generate Bags.

  22. 22
    Article
    Avatar of collectionsCollections·1y

    Leveraging Cursor AI for Laravel: Hotel Booking Project and Tab Auto-Completions

    Integrating AI tools like Cursor AI can streamline Laravel development by automating routine tasks and providing real-time coding assistance. Generating Filament resources can be achieved either via traditional terminal commands or the AI-driven Cursor Composer, each with its own pros and cons. In a hotel booking project example, Cursor AI facilitated development but required careful code verification. Enhanced productivity can be achieved with Cursor AI's tab auto-completions, though it is crucial to maintain high code standards by balancing AI convenience with meticulous code review.

  23. 23
    Article
    Avatar of lnLaravel News·1y

    Laravel News

    Skeletor is a scaffolding package created by Josh Manders for setting up new applications. It integrates with Laravel but is not exclusive to it and simplifies adding custom functionality through `composer create-project`. Users can script setup tasks such as configuring UI components, setting up databases, and customizing new projects efficiently. Detailed usage examples are provided, and the package can be published to Packagist for broader use.

  24. 24
    Article
    Avatar of stitcherstitcher.io·1y

    PHP version stats: January, 2025

    PHP version usage statistics show a steady decline in older versions and gradual adoption of PHP 8.4 since its recent release. While PHP 8.1 remains the most used version, PHP 8.3 has seen significant growth. The analysis includes trends in minimum PHP version requirements for popular packages, encouraging the community to keep projects up-to-date for better security and performance.

  25. 25
    Article
    Avatar of laraveldevLaravel Dev·1y

    Quick Laravel Filament Tip

    Learn how to run specific logic only within or outside of Filament in a Laravel application using two methods to check if Filament is serving a request. This helps in separating admin logic from other parts of your app.