stefanbauer's avatar

How to build an own framework (app) edition of Laravel

Hi Guys,

after a lot of work in the last few months i am back at Laracasts :)

Anyways.. i would like to create an own framework (app)edition of Laravel for my personal needs that i can use any time i will create a new project for my clients. With "framework edition" i mean a single entry point with some defaults defined. E.g. some folder reorganization, some improvements for the environment handling, bower including, prepared json with some default packages i need everytime and so on. But of course i will not miss a commit in the real Laravel App/Framework. Anyways.. i would also love to use composer for this personal edition.

What would you do? My idea was to fork laravel/laravel, keep master as it is, and use the develop branch for it. Modify everything what i need and that's it. Create a new package at composer for that edition and thats it. So i am able to modify my version when needed and could also pull in the changes from the original laravel repository.

Are there any other ideas? Or what would you suggest?

Before someone asks: I want to do that because on every single project i do the whole setup process always and always again. It it time consuming but it never changes. That's why i want to have such "edition" for me personally. :)

0 likes
4 replies
Kryten's avatar

Are you thinking of making changes to the core Laravel files? if so, I would go with the suggestion made by @martinbean.

If you're just starting from a bare Laravel app & building in the "normal' way (ie. just implementing the code for your applications without touching the core), you could also just start by installing Laravel normally, building the basic functionality, and then committing that. Then, when you want to start a new application, you clone that, do a composer install (which will get you Laravel and any other packages you need), then push to a new repository for that client.

1 like
EliasSoares's avatar

I've created a package just to put some common things that are used on all my projects, including my default admin interface.

This reduced a lot of work, both at creating and maitenance of my projects.

It's just a package, that I include on composer and put my service providers/facades on config/app.php.

It have common login/register things, user model with some custom fields, photo, etc. Also have a way to creating filters for index views, ordering, and etc.

stefanbauer's avatar

First of all. Thank you very much for your replies.

I think @martinbean does the right first steps. Generally i would like to use different folder structure and of course modify some core things in the app itself (not the framework core). I just want to have a good entrypoint / boilerplate for new projects with my personal directory structure, some basic concepts. I also will integrate some BaseModel, BaseRepository and so on (but this is in a different package that i will pull in into this boilerplate). So this "boilerplate" should be a single project, hosted on github (and packagist) where i still have the possibility to pull the changes from the upstream.

So if i would just clone it, make my changes and push it to my repository.. Is that the way? I don't need to use a fork? So i just have a origin (my repos) and the upstream (Taylors) and that's it? And if i start a new project, i can clone it directly from github or use it as a package project on packagist (that i could install via composer the whole project). Then i can start and push it to the new clients repository. Right?

Please or to participate in this conversation.