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

masteringlaravel logo
Laravel Code Review

Get expert guidance in a few days with a Laravel code review

Visit Laravel Code Review

The latest

View all →
Agent Run Observability in Laravel AI SDK 0.11 image

Agent Run Observability in Laravel AI SDK 0.11

Read article
Debounced Queued Event Listeners in Laravel image

Debounced Queued Event Listeners in Laravel

Read article
Statamic Mailables Viewer Previews Laravel Emails in the Control Panel image

Statamic Mailables Viewer Previews Laravel Emails in the Control Panel

Read article
Laravel Tackle: Run an AI Coding Agent in Your Laravel App image

Laravel Tackle: Run an AI Coding Agent in Your Laravel App

Read article
Queue::forward(): Reroute Laravel Queues in One Place image

Queue::forward(): Reroute Laravel Queues in One Place

Read article
Laravel Read-Through Filesystem: Lazy Storage Migration image

Laravel Read-Through Filesystem: Lazy Storage Migration

Read article