Best of LaravelOctober 2024

  1. 1
    Article
    Avatar of communityCommunity Picks·1y

    Things to do after a fresh laravel install

    When setting up a fresh Laravel installation, consider using the Laravel installer for a streamlined process, including selecting a starter kit such as Inertia/React or Livewire Volt with Class. Recommended packages for enhancing your Laravel setup include Laravel-error-solutions, laravel-schedule-monitor, laravel-env-keys-checker, and tighten/duster. Configuration tips include addressing the n+1 query problem and ensuring JSON responses for API routes in Laravel 11 and above. Example configurations for tlint, pint, and package.json are shared for better project setup.

  2. 2
    Article
    Avatar of lnLaravel News·1y

    API Platform for Laravel

    API Platform simplifies the process of creating modern web APIs using Symfony or Laravel. It allows exposing Eloquent models as REST or GraphQL APIs, dynamically generating OpenAPI specifications, automatic CRUD operations, pagination, validation, and more. The platform also includes tools for securing routes, filtering, and integrating with Laravel's authorization system.

  3. 3
    Article
    Avatar of communityCommunity Picks·1y

    Wave · The perfect Laravel Starter Kit for your next idea.

    Wave is an open-source Laravel starter kit aimed at quickly launching SaaS applications. It offers features such as customizable user profiles, user permissions based on roles, billing setup, and adaptable themes. Built with Tailwind CSS and Alpine for responsive design and dynamic interactivity, Wave is designed for productivity and ease of use. Ideal for those looking to transform ideas into profitable SaaS products quickly.

  4. 4
    Article
    Avatar of communityCommunity Picks·2y

    Introduction to Laravel API Development: Setup and Essentials

    Dive into building high-performance APIs with Laravel, a powerful PHP framework. Learn how to set up a new Laravel project, optimize it for API development, and utilize tools like Laravel Breeze, Pest PHP, TablePlus, and PHPStan for streamlined workflow. The guide covers essential topics including data modeling, API design, authentication, rate limiting, versioning, pagination, security, and testing.

  5. 5
    Article
    Avatar of communityCommunity Picks·2y

    Headless E-Commerce for Laravel

    Lunar is an open-source package that adds headless e-commerce functionality to Laravel. It provides flexibility to build custom online stores, an administration hub for managing catalogues and orders, and a RESTful JSON:API for powering JavaScript or mobile store fronts. The installation is straightforward, requiring just two commands to set up. Lunar is built around Laravel Eloquent models, making it familiar for Laravel developers.

  6. 6
    Article
    Avatar of freekFREEK.DEV·2y

    A Guide to Laravel Pipelines

    Learn how to use the Pipeline class in Laravel to break down complex workflows into smaller, isolated processes, and how to test these pipelines effectively.

  7. 7
    Article
    Avatar of lnLaravel News·2y

    Prism is an AI Package for Laravel

    Prism is a Laravel package designed to integrate Large Language Models (LLMs) into applications, providing a unified interface for working with popular AI providers like Anthropic, OpenAI, and Ollama. Key features include elegant provider integrations, a fluent text generation API, seamless tool integration, and flexible configuration options. Full installation instructions and source code are available on GitHub.

  8. 8
    Article
    Avatar of communityCommunity Picks·2y

    Implementing Passkey Authentication in Your Laravel App

    Learn how to add passkey authentication to your Laravel app, allowing users to log in using their devices without passwords. The guide walks through setting up the WebAuthn API with SimpleWebAuthn for the client-side and Webauthn Framework from Spomky Labs for the server-side. The demo includes code snippets for database setup, JavaScript for the authentication flow, and the necessary controllers and views.

  9. 9
    Article
    Avatar of lnLaravel News·1y

    Always Render API Exceptions as JSON in Laravel

    Laravel 11 introduces a new method, `shouldRenderJsonWhen()`, to enforce JSON responses for API exceptions without needing custom middleware. This improvement ensures that exceptions during API requests are always rendered as JSON, enhancing the developer experience when testing API routes in web browsers.

  10. 10
    Article
    Avatar of communityCommunity Picks·1y

    A growing list of well built open-source apps in Laravel

    This post presents a curated list of well-built open-source applications created using the Laravel framework, ranging from accounting software to social media platforms. These projects provide valuable learning opportunities and insights into real-world Laravel applications. Readers are encouraged to contribute and suggest more projects to expand the list.

  11. 11
    Article
    Avatar of communityCommunity Picks·2y

    9 Open Source Projects to Contribute to - Hacktoberfest 2024

    Hacktoberfest is a month-long event encouraging contributions to open-source projects. Participants can earn a shirt by making four pull requests on GitHub repositories with the 'hacktoberfest' label. The post lists several projects and resources for new contributors, including tutorials, eBooks, and specific projects such as TailwindCSS Components, LaraSail, Wave, and more. These resources aim to help users get started with Git, GitHub, and various development tasks.

  12. 12
    Video
    Avatar of t3dotggTheo - t3․gg·1y

    I was too dumb for Laravel. Then they fixed it.

    A developer describes their initial struggles with setting up Laravel and how their feedback led to significant improvements in the framework, making it easier to install and use, particularly for those coming from different development backgrounds. The post highlights changes like a new installation method and better logging support, showing how responsive the Laravel team has been to feedback.

  13. 13
    Article
    Avatar of lnLaravel News·1y

    Creating a CLI Application With Laravel and Docker

    Learn how to create a CLI application using Laravel and Docker. The guide provides steps to set up a project, scaffold a command to check stock prices using the Polygon.io API, and prepare the application to run via Docker. It also explains how to configure environment variables for API keys and leverage Docker's ENTRYPOINT instruction for running commands.

  14. 14
    Video
    Avatar of laraveldailyLaravel Daily·2y

    Laravel Roles/Permissions: Complex Multi-Clinic Project

    Managing roles and permissions in a complex multi-clinic project using Laravel involves using Spatie's Laravel Permission package, global scopes, and enums to manage roles within different teams. The project uses a structured, policy-driven approach to permissions, showcasing features like CRUD operations managed by different roles such as master admin, clinic owner, and staff/doctor. Automated testing is emphasized to ensure security, given the high cost of bugs related to unauthorized access.

  15. 15
    Article
    Avatar of communityCommunity Picks·1y

    Flexible Caching in Laravel Made Super Easy

    Laravel 11 introduces a new `Cache::flexible()` method that revolutionizes data caching by using a two-tier Time To Live (TTL) system. This allows serving slightly outdated data while refreshing in the background, balancing data freshness with application performance. The method is illustrated with practical examples like e-commerce recommendations and dashboard analytics, highlighting its benefits in improving performance and responsiveness. However, it's not recommended for security-critical data.

  16. 16
    Article
    Avatar of communityCommunity Picks·1y

    Laravel custom helper functions – Fast Tips

    Helper functions in Laravel are widely popular and make it easy to access reusable code snippets. A common example is the `url()` function for generating application URLs. Another useful function is `retry()`, which retries statements a certain number of times if an exception is thrown, often used in API calls. The post also explains how to create custom helper functions, using `array_map_assoc` as an example, and how to load them via Composer's autoload. This enables you to use custom functions throughout your Laravel application.

  17. 17
    Article
    Avatar of lnLaravel News·1y

    Pan Analytics Viewer

    The Pan Analytics Viewer is a new Laravel package by Lukas Mateffy that allows you to view your `panphp/pan` analytics directly within the UI without using the CLI. Installation is straightforward with a composer command and the addition of a viewer component to your blade template. Make sure to render this component only for users with the necessary permissions to protect the analytics data.

  18. 18
    Video
    Avatar of communityCommunity Picks·1y

    Laravel Livewire Crash Course | Livewire 3 Tutorial for Beginners in 1.5 Hours

    This post provides a crash course on Laravel Livewire, a framework for building dynamic front-end UIs without leaving PHP. It covers the basics of Livewire, including setting up a Laravel project, creating Livewire components, managing state and methods, form handling, and using events to enable communication between components. The post also touches on advanced topics like lazy loading and leveraging Livewire's built-in functionalities for improved user experiences.

  19. 19
    Article
    Avatar of communityCommunity Picks·2y

    Using Redis for Caching in Laravel: A Step-by-Step Guide

    Discover how to set up Redis for caching in Laravel applications with this step-by-step guide. Learn about installing Redis and connecting it to Laravel using phpredis, configuring environment variables, and performing various cache operations such as adding, getting, and deleting cache elements. Additionally, understand advanced usage scenarios like key pattern searches and incremental scanning for handling large datasets efficiently.

  20. 20
    Article
    Avatar of communityCommunity Picks·2y

    Logging Database Queries with Eloquent ORM and Laravel – Fast Tips

    Understanding what your application does during execution is crucial, and logging raw database queries with Eloquent ORM in Laravel can enhance this understanding. This guide discusses the importance of abstraction layers, deep dives into Eloquent ORM, and demonstrates how to log database queries. It includes instructions on using both service providers and model observers for query logging. Additionally, it reviews advanced tools such as Laravel Telescope, DebugBar, and Inspector for more comprehensive application monitoring.

  21. 21
    Article
    Avatar of lnLaravel News·2y

    WireSpy is a Sleek New Debug Bar for Laravel Livewire

    WireSpy is a new debug bar for Laravel Livewire that allows users to inspect, modify, and debug component states, track events, and enable hot reloading. It was recently released in beta and can be installed via composer. You can toggle it using CMD+L/CTRL+L.

  22. 22
    Article
    Avatar of lnLaravel News·1y

    Laravel 11.28 Adds a Composer Dev Command

    Laravel 11.28 introduces several new features, including a `composer run dev` command for easier development setup, a default Tailwind CSS configuration, and a new `CollectedBy` attribute to define custom Collection classes. Additionally, interactive `env:encrypt` and `env:decrypt` commands have been added, along with new helpers for default locale and currency in the Number facade.

  23. 23
    Article
    Avatar of lnLaravel News·1y

    Laravel 11.30 Released

    Laravel 11.30 introduces new features including defer testing helpers, custom unique string IDs for Eloquent models, and support for backed enums with the AuthorizesRequests trait. Highlights include new withDefer() and withoutDefer() test helpers, the HasUniqueStringIds trait for custom IDs, and the ability to directly pass enums to the authorize() method. Additional updates can be reviewed through the GitHub changelog.

  24. 24
    Article
    Avatar of lnLaravel News·1y

    Sprout Multitenancy Package for Laravel

    Laravel Sprout by Ollie Read is a multitenancy package for Laravel that is still in active development and has not yet reached version 1.0. The package aims to provide a feature-rich and flexible multitenancy solution with various tenant identification methods, dependency injection support, Eloquent Tenant support, and initial single database support. Future plans include domain-based tenancy, multi-database support, and more.