Best of PHPSeptember 2024

  1. 1
    Article
    Avatar of communityCommunity Picks·2y

    vitodeploy/vito: The Ultimate Server Management Tool

    Vito is a self-hosted web application designed to streamline server management and deployment of PHP applications into production. It offers features like server provisioning, database management, firewall management, custom and LetsEncrypt SSL support, SSH key deployment, cron job management, and leverages Supervisor for queue handling. Ideal for deploying Laravel and other PHP applications.

  2. 2
    Article
    Avatar of medium_jsMedium·2y

    The 7 Levels of Laravel Optimization: From Rookie to Optimization Overlord — with Benchmark — 98% reduction

    This post guides you through seven levels of optimizing Laravel applications, from basic eager loading to advanced techniques like lazy collections and chunking. It details each step with code examples and benchmarks, showing significant resource savings at each level.

  3. 3
    Article
    Avatar of communityCommunity Picks·2y

    TallStackUI

    TallStackUI offers over 30 ready-to-use Blade components to enhance the workflow of Livewire applications. It features easy installation, unique customization options, and continuous updates to keep the library current. Developers can expect a range of components such as alerts, badges, modals, and more, all designed to save development time and effort.

  4. 4
    Article
    Avatar of lnLaravel News·2y

    Fetch PHP is a Lightweight HTTP Library Inspired by JavaScript's fetch()

    Fetch PHP is a lightweight HTTP library for PHP inspired by JavaScript's fetch API. It leverages the Guzzle client to offer both synchronous and asynchronous HTTP requests via a simple API. Key features include methods for JSON decoding, text extraction, and binary handling of responses. It supports easy integration with Guzzle options for advanced needs.

  5. 5
    Article
    Avatar of stitcherstitcher.io·2y

    Building a framework

    The author shares their journey from aspiring to build a framework to finally realizing this dream with the development of Tempest, a new PHP framework. Initially skeptical, they regained confidence through their work at Spatie and interactions with the developer community. The framework, which started as a learning experiment, gained interest and contributions from developers. Now in its alpha phase, Tempest aims to test if there is genuine interest and potential for growth.

  6. 6
    Article
    Avatar of lnLaravel News·2y

    A Deep Dive into Sessions in Laravel

    Sessions in Laravel are crucial for persisting data across multiple requests, such as user authentication status and temporary data. Laravel offers various session drivers like cookies, databases, and cache stores. This post explores common pitfalls, such as typos in session keys, session key clashes, and unknown data types. It suggests using session classes for better session management, incorporating methods to generate session keys and adding type hints. Testing session data is vital, and both unit and feature tests are recommended to ensure correct functionality.

  7. 7
    Article
    Avatar of snykSnyk·2y

    What you should know about PHP security vulnerabilities

    PHP is a popular scripting language for web development, which makes it a target for hackers. Developers must understand PHP security risks like SQL Injection and code injection, and use practices like sanitizing inputs, using prepared statements, and regularly updating dependencies to mitigate these risks. Tools like Snyk can automate the process of identifying and fixing vulnerabilities in PHP applications, ensuring compliance and protecting against breaches.

  8. 8
    Article
    Avatar of communityCommunity Picks·2y

    Upload File in Laravel

    Learn how to upload files in Laravel using its unified API for various storage systems, including local disk and remote storage like AWS S3. The Storage Facade allows seamless interaction with different storage drivers via configurable 'disks'. The public disk setup is explained, along with example code for both request-based and Storage facade-based file uploads.

  9. 9
    Article
    Avatar of lnLaravel News·2y

    Laravel Config Checker Package

    The Laravel Config Checker package by Chris Di Carlo scans your codebase to verify if config keys are correctly defined in your config files. Running `php artisan config:check` identifies missing or undefined config errors, displaying them in a table with details on the location and missing references.

  10. 10
    Article
    Avatar of communityCommunity Picks·2y

    Laravel Livewire: What it is, and how to use it in your web app

    Livewire is a Composer package for Laravel that allows the development of reactive web applications without the need for a dedicated JavaScript framework like Vue or React. It works by having a PHP class and a Blade template per component, with interactions handled via AJAX calls to the server. Installation is straightforward, requiring just a few Blade directives and a single Composer command. The package enables seamless integration with other Laravel features, making it a valuable tool for Laravel developers looking to maintain a unified codebase.

  11. 11
    Article
    Avatar of lnLaravel News·2y

    Prepare your Laravel app for the cloud

    Learn how to prepare a Laravel app for cloud deployment by mimicking the production environment using Docker. The guide covers setting up a local PostgreSQL database, configuring Dockerfiles, and deploying to the cloud provider Sevalla. Key steps include handling environment variables, creating Docker images, and setting up database migrations.

  12. 12
    Article
    Avatar of lnLaravel News·2y

    Building Multiplayer Minesweeper with Laravel, Livewire and Reverb

    Jared Short recounts his experience building a multiplayer Minesweeper game using Laravel, Livewire, and Reverb, hosted on Fly.io. He emphasizes the ease of developing without extensive frontend JavaScript and highlights challenges like managing large payloads and navigating Laravel's ecosystem. Despite initial disorientation, Jared finds Laravel's capabilities impressive and acknowledges the potential for optimization in his project.

  13. 13
    Article
    Avatar of lnLaravel News·2y

    Laravel 11.24 Released

    Laravel version 11.24 introduces new features including shorthands for Process fakes, a nullOnUpdate() method for foreign key definitions, and support for retrying multiple batch jobs at once. Notably, there's a temporary workaround for issues with auto-discovery of console commands. Additional improvements include the ability to use backed enums with Route::can() and new methods for the View factory.

  14. 14
    Article
    Avatar of communityCommunity Picks·2y

    How to group array by date in PHP – Fast Tips

    Learn how to group arrays by date using PHP with the array_reduce function. The post also covers filtering and grouping in Laravel, using Controller and Blade templates to display the results. Additionally, it provides methods for grouping using Laravel Collection class efficiently.

  15. 15
    Article
    Avatar of lnLaravel News·2y

    LangCountry launches v4

    Laravel LangCountry has launched version 4, adding support for Carbon Macros which allow for country-specific date formatting directly on Carbon instances. This package enhances Laravel's localization by considering both language and country, catering to variations in date format, localized country names, and currency symbols.

  16. 16
    Article
    Avatar of communityCommunity Picks·2y

    Laravel guide for React developers

    For React developers looking to venture into server-side development, Laravel offers a robust PHP framework that can complement their projects. This guide highlights the parallels between the two, such as Laravel's MVC structure compared to React's component-based architecture. Key points include the use of Laravel's models, views, controllers, routing, middleware, and built-in authentication features. Additionally, it discusses how Laravel can serve as a backend API for React applications and the benefits of using Laravel Breeze with Inertia for building single-page applications.

  17. 17
    Video
    Avatar of laraveldailyLaravel Daily·2y

    Laravel Mini CRM for Beginners in 1 Hour: Step-by-Step

    The post introduces a step-by-step tutorial for building a mini CRM using Laravel in one hour, focusing on beginner-friendly concepts. It covers creating CRUD operations for users, clients, projects, and tasks, including role-based access control and soft deletes. The author shares the source code and describes the process of setting up Laravel Breeze for authentication and using the Spatie Laravel Permission package for roles and permissions.

  18. 18
    Article
    Avatar of lnLaravel News·2y

    PHP and LLMs with Alfred Nutile

    Alfred Nutile explores the relationship between Laravel and Large Language Models (LLMs), discussing how LLMs are influencing programming and content creation. With extensive experience, including introducing Laravel at Pfizer, Alfred shares insights on leveraging LLMs in development and their potential for the Laravel ecosystem.

  19. 19
    Article
    Avatar of jetbrainsJetBrains·2y

    Laravel Trends 2024: Results Overview

    The 2024 State of Laravel survey results reveal Laravel's growing popularity, with significant use in business applications and a strong community focus on new versions and integrations. PhpStorm remains the top IDE for Laravel developers, followed by Visual Studio Code. Most developers prefer using the latest PHP versions and traditional debugging techniques. Laravel's ecosystem, including tools like Laravel Forge, Vapor, and Nova, continues to expand, supporting seamless integrations and improving development efficiency.

  20. 20
    Article
    Avatar of lnLaravel News·2y

    Chaperone Eloquent Models in Laravel 11.22

    The Laravel team released version 11.22, introducing the new chaperone() Eloquent method for inverse relations, support for passing backed Enums to Queuable methods, and allowing Enums to be passed to route domain() and name() methods. Additional updates include improvements to parameter type handling, enhanced model serialization, and support for PHP 8.4 features.

  21. 21
    Video
    Avatar of laraveldailyLaravel Daily·2y

    12 Laravel/PHP Tips in 8 Minutes: August 2024

    Discover 12 handy Laravel and PHP tips gathered from Twitter for August 2024. These include SQL best practices, filtering emails in Laravel validations, specific uses of the explode function in PHP, and optimizing Laravel performance. Also included are general advice on handling tutorials, particularly those generated by AI, and notable announcements from the Laravel community. Perfect for both developers looking to refine their techniques and those eager to stay updated with the latest in the Laravel ecosystem.

  22. 22
    Article
    Avatar of communityCommunity Picks·2y

    Test-Driven Laravel

    Learn how to build robust Laravel applications using Test-Driven Development (TDD) through a comprehensive 22-hour video course. Gain insights from real-world challenges and develop features for a marketable product, TicketBeast, while covering fundamentals and advanced topics. The course includes practical advice, hands-on lessons, and custom tools to streamline the learning experience.

  23. 23
    Video
    Avatar of communityCommunity Picks·2y

    Laravel and API Platform

    The post discusses integrating Laravel with API Platform, a PHP framework initially focused on Symfony. The author explains how to set up a Laravel API using API Platform, including installation, dependency updates, and configuring models with API resources. The integration simplifies creating CRUD operations, middleware integration, and configuring API documentation. The author highlights the ease of adding features like GraphQL and customizing serialization, filters, and other API aspects.