At Spatie we use a homegrown Laravel template called Blender. It's being used on nearly all our projects. When starting with a greenfield project we take a copy of Blender and make project specific changes in that copy. Â We built it because we want maximum flexibility and don't want to be hampered by the limitations of a one size fits allÂ out of the box solution. The whole teamÂ is constantly tinkering and improving Blender, it's an experimenting ground for learning new techniques.
A few weeks ago I put the source code of Blender in a public repo on GitHub. There are several benefits in doing so:
- Because the quality of the code is directly reflecting on our company,Â there is a extra incentive toÂ deliver quality.
- PotentialÂ clients can inspect our code before trusting their projects to us. They will hopefullyÂ agree that anybodyÂ proficient inÂ Laravel can modifyÂ Blender.
- All tools like Travis, Scrutinizer and Sensiolabs Insights and GitHub can be used for free.
- In time, we might get quality pull requests like the ones we're get on our public packages.
This is how the login screen and back-section look like:
If you need a good Laravel based CMSÂ that is well documented and intended for public use take a look at Asgard CMS,Â October CMSÂ or one of the many alternatives.Â But ifÂ Â you wantÂ learn a bit by diving intoÂ code head over to the Blender-repo on GitHub. You might discover some thingsÂ that could come inÂ handy in your projects.
Some interesting tidbits on how Blender works:
- Most projects have three main sections: the back-section (to administer content), Â the auth-section (logins / password resets) and aÂ public facing section.Â Each section has its ownÂ route file that is being loaded by the route service provider
- Blender has several goodies built in to support multilingual sites. The languages that are needed in a project are specified in the config file. Â The route service provider will prefix routes of the front-section with a the current locale. There is a dedicated class to determineÂ the currentÂ locale of the app.
- We use a bunch a packages and are eating our own dog food.
- All content (such as news or articles) can be administered in the back section.Â Each content type has it's own model, controller and views. Because there is a lot of logic shared these models and controllers are inherited from a base model- and base controller-class. The actual models and controllers remain quite skinny.
- FormsÂ to administer content in the backsite can be created very fast using the form builderÂ so views can remain minimal.
- To improve performance we can decorate repositories.
- "Push forward" is our motto and we try to useÂ the latest Laravel featuresÂ whenever possible.
- TheÂ client side to our media libraryÂ has recently received a nice upgrade and is now entirely built with React.
Putting the code on GitHub is just a first step. We currently offer no support and no public documentation. Though it might take a while that might change in the future.Â If we ever get to that point, we can leverage the power of the community to improve our code.
You may use Blender for your own projectsÂ but please noteÂ that we offer no support whatsoever andÂ do not guarantee that the code is stable. Â In short: when using BlenderÂ you're on your own. But don't let that stop you reading the code on GitHub.