Best of PHPFebruary 2025

  1. 1
    Article
    Avatar of communityCommunity Picks·1y

    NativePHP

    NativePHP is expanding its capabilities to mobile platforms, enabling app development for both iOS and Android. An Early Access Program (EAP) offers exclusive benefits such as early access to code, documentation, and other resources, and allows members to influence the project’s direction. Annual licenses for the EAP cost $250 and include special perks like premium tools, starter kits, and discounts.

  2. 2
    Article
    Avatar of exakatExakat·1y

    The Top 100 PHP functions in 2024

    A list of the top 100 most commonly used native PHP functions, ranked by usage frequency across 2500 open source PHP projects. The analysis shows that string, array, and file functions are most popular, while math functions based on operators and database functions using classes or components are less common. Insights highlight that certain functions could be replaced by operators, and some recently deprecated functions do not appear in the top 100. Recommendations include reviewing these functions for better understanding and integration into coding teams.

  3. 3
    Article
    Avatar of lnLaravel News·1y

    Laravel 12 release date

    Laravel 12 will be launched on February 24th, 2025, as announced at Laracon EU. This version will include new starter kits with options for React, Vue, or Livewire and will have zero-breaking changes. It's recommended to upgrade to Laravel 11 before the release, and Laravel Shift is suggested for an automatic upgrade process.

  4. 4
    Article
    Avatar of laravelkidsLaravel Kids·1y

    Laravel CRUD with Repository Pattern

    The post provides a detailed guide on how to implement CRUD (Create, Read, Update, Delete) operations in Laravel using the repository pattern, which helps in organizing code better and making the application more maintainable.

  5. 5
    Article
    Avatar of phpdevPHP Dev·1y

    Write Cleaner Code with Nullsafe Operator in PHP 8!

    PHP 8 introduces the Nullsafe Operator (`?->`) to simplify code by handling `null` checks within object chains in a single line. Using this operator leads to cleaner, more maintainable, and modern PHP code by eliminating nested `if` statements, resulting in fewer lines of code and faster development.

  6. 6
    Article
    Avatar of lnLaravel News·1y

    Everything we know about Laravel 12

    Laravel 12, launching on February 24th, 2025, will primarily be a maintenance release with minimal breaking changes. New features added in Laravel 11 include a fluent helper, reversible form prompts, and more. Additionally, new starter kits with React, Vue, or Livewire support will be introduced. A new Laravel website with updated branding is also expected.

  7. 7
    Article
    Avatar of lnLaravel News·1y

    Fire Tower: Application & Config Monitoring

    Fire Tower is a Laravel package designed to monitor applications and configurations. It checks for Laravel and PHP versions, ensures debug mode is off in production, and verifies mail configurations. Users can create custom checks to monitor specific data conditions. Fire Tower is ideal for hobbyists and agencies alike, with flexible pricing plans and an easy setup process.

  8. 8
    Article
    Avatar of lnLaravel News·1y

    Laravel IDEA v10 is Here

    Laravel IDEA v10 release introduces significant new features such as smart database tables and fields completion, advanced Inertia.js support, native Laravel facades support, and additional code generation capabilities like Create Pivot Table and Create Enum. The release promises to enhance development speed and efficiency.

  9. 9
    Article
    Avatar of juststevekingJustSteveKing·1y

    Advanced Authorization methods in Laravel

    Laravel offers robust authorization mechanisms through Gates and Policies, primarily using RBAC. However, for more granular control, ReBAC, ABAC, and PBAC models can be implemented to suit various use cases. ReBAC is useful for relationship-based checks, ABAC offers fine-tuned control through attributes, and PBAC combines attributes and relationship-based checks with high-level policy definitions. Choosing the right model depends on the complexity, performance, and scalability needs of your application.

  10. 10
    Article
    Avatar of lnLaravel News·1y

    Laravel News

    Rector v2.0 is a tool for improving PHP code quality and migrating legacy projects from PHP 5.3 to 8.4. The new version boasts performance improvements and new features such as the `--only` option, Composer-based sets, default polyfill packages, smarter annotations to attributes sets, and leaner custom rules.

  11. 11
    Article
    Avatar of lnLaravel News·1y

    NativePHP for iOS

    NativePHP for iOS allows PHP applications to run natively on iPhones using Laravel and Livewire without transpiling the code. This development brings new functionalities like taking photos, push notifications, and in-app purchases directly from Laravel. Simon Hamp has successfully gotten his prototype approved by Apple, and there's an early access program available for developers to get the latest features.

  12. 12
    Article
    Avatar of lnLaravel News·1y

    Eloquent Relationship Queries in Laravel with whereRelation

    Laravel's whereRelation method simplifies filtering models based on their relationships' attributes, making queries more readable and maintainable. This feature is useful for complex filters in various applications like e-commerce platforms and content management systems.

  13. 13
    Article
    Avatar of exakatExakat·1y

    How to call a method in PHP

    This post provides an extensive guide on various methods to call a method or function in PHP, covering commonly used techniques as well as niche syntaxes. It includes examples such as classic calls, dynamic names, closures, call_user_func(), array syntax, static methods, anonymous methods, reflection calls, and the eval() method, offering a comprehensive view on method invocation in PHP.

  14. 14
    Article
    Avatar of laravelkidsLaravel Kids·1y

    Laravel 12: Discover the Latest Version of the Popular PHP Framework!

    Laravel 12 introduces significant improvements in performance, developer experience, and security. Key features include asynchronous caching, enhanced query builder methods, real-time linting, AI-powered debugging, native GraphQL support, and modern frontend tool integration like Vite and Tailwind CSS. The official release is expected in Q1 2025, requiring a minimum of PHP 8.2, with a support policy extending until 2027.

  15. 15
    Article
    Avatar of lnLaravel News·1y

    Request Handling with PHP Enums in Laravel

    Laravel now supports direct enum handling, improving validation and data consistency in request processing. This feature allows developers to handle predefined sets of values type-safely and provides an example of a subscription management system, including the code for defining enums, handling requests, and processing subscription updates.

  16. 16
    Article
    Avatar of thisdotThis Dot·1y

    An Introduction to Laravel Queues and Temporary URLs

    Learn to create an online video conversion website using Laravel. The guide covers setting up Laravel, leveraging Livewire for dynamic file uploads, and using queue jobs for processing tasks. Additionally, it explains how to generate temporary URLs for downloading files. Ideal for developers new to Laravel, the tutorial offers a practical example of building a scalable and robust web application.

  17. 17
    Article
    Avatar of lnLaravel News·1y

    Packistry is a Self-hosted Composer Repository Made with Laravel

    Packistry is a self-hosted Composer repository designed to simplify PHP package distribution. It supports importing from sources like GitHub, GitLab, and Gitea with updates using webhooks. Key features include private repository support, token-based authentication, and granular access control for both human and machine users. Built with Laravel 11, Packistry uses various community packages and modern front-end technologies.

  18. 18
    Article
    Avatar of lnLaravel News·1y

    Phiki: A Powerful PHP-Based Syntax Highlighter for Web and Terminal

    Phiki, developed by Ryan Chandler, is a PHP-based syntax highlighter that uses TextMate grammar files and Visual Studio Code themes to generate syntax-highlighted code for web and terminal. It supports over 200 language grammars, more than 50 themes, and features line numbers and multi-theme support. Phiki integrates easily with CommonMark for blogs and documentation sites.

  19. 19
    Article
    Avatar of lnLaravel News·1y

    Handling Missing Request Data in Laravel

    Laravel offers methods such as missing() and whenMissing() to effectively manage absent request data. These methods help in handling optional fields and setting default values for them. The post includes sample code demonstrating the use of these methods in a settings update system to enhance code expressiveness and maintainability.

  20. 20
    Article
    Avatar of phpdevPHP Dev·1y

    ??, ??=, ?: x Operators and “Falsy” Values in PHP

    Discover the benefits and use cases of PHP's `??`, `??=`, and `?:` operators to write cleaner, more efficient code. Learn to handle 'falsy' values effectively for more readable and maintainable code. Practical examples demonstrate how to implement these operators in real-world scenarios.

  21. 21
    Article
    Avatar of twitter_xTwitter X·1y

    What's new in Laravel 12?

    Laravel 11 has introduced new features and improvements aimed at enhancing the development experience. Upgrading to Laravel 11 can provide better performance, new functionalities, and improved developer tools.

  22. 22
    Article
    Avatar of lnLaravel News·1y

    First Factor One-Time Passwords for Laravel with OTPZ

    OTPZ is a Laravel package developed by Ben Bjurstrom that enables secure first-factor one-time passwords for Laravel applications. Features include rate-limiting, OTP expiration, session-specific OTPs, detailed error messages, and customizable mail templates. Installation involves Composer and Artisan commands, making it relatively simple to implement. The package supports Laravel Breeze with Livewire or Inertia.