Laravel Examples
Published on by Eric L. Barnes
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 is the creator of Laravel News and has been covering Laravel since 2012.