News

Laravel Examples

Published
Laravel Examples image

Povilas Korop, the creator of Laravel Daily, started a brand new project called Laravel Examples that is a catalog of code examples, structured by topic and by the projects.

I like the idea behind this project, and I think it could be a great way of learning about new concepts from existing code or even finding how others are implementing different patterns.

For example, let's say you need to create your own helpers for a project and would like to see how others are doing it. In the example from Akaunting you can see how they load their custom files through Composer:

// We autoload that helper file in our composer.json

{
    "name": "akaunting/akaunting",
    "description": "Free accounting software, based on Laravel framework.",
    // ... other values

    "autoload": {
        "files": [
            "app/Utilities/helpers.php"
        ]
    },

    // ... other values
}

Then see precisely where the helpers are called and how they structured their code. I'm sure as Povilas adds more and more examples to the site, it will be an even better learning resource. Check out Laravel Examples and send him any feedback.

Eric L. Barnes photo

Eric is the creator of Laravel News and has been covering Laravel since 2012.

Filed in

Sponsored

serpapi logo
SerpApi

The Web Search API for Your LLM and AI Applications

Visit SerpApi

The latest

View all →
Migration Durations and Job Memory Usage in Laravel 13.45 image

Migration Durations and Job Memory Usage in Laravel 13.45

Read article
Laravel CLI: One Binary for New PHP and Rust Laravel Apps image

Laravel CLI: One Binary for New PHP and Rust Laravel Apps

Read article
Phactorial: Render LaTeX Math to SVG and PNG in PHP image

Phactorial: Render LaTeX Math to SVG and PNG in PHP

Read article
Laravel, reimagined image

Laravel, reimagined

Read article
Laravel Rust: A New Rust Web Framework From Laravel image

Laravel Rust: A New Rust Web Framework From Laravel

Read article
Laravel Converse and Agent Kit for Chat Bots and AI Agents image

Laravel Converse and Agent Kit for Chat Bots and AI Agents

Read article