Giter VIP home page Giter VIP logo

laravel-tenants-example's Introduction

thisisdevelopment/laravel-base

An opinionated base laravel install.

Install

composer create-project thisisdevelopment/laravel-base <dir>

Or alternatively if you don't have composer installed locally:

dir=<dir>
git clone https://github.com/thisisdevelopment/laravel-base $dir
cd $dir
rm -rf .git
./bin/dev init

Folder structure

This is modeled after the domain oriented structure proposed by sticher.io: https://stitcher.io/blog/laravel-beyond-crud-01-domain-oriented-laravel The proposed structure is extended with the concept of modules, which are default implementations of generic domain code.

The complete structure is

  • app <= toplevel app dir, no code here
  • app/App/<app name>/ <= application specific code
  • app/Domain/<domain> <= domain specific code
  • app/Domain/vendor/<domain> <= generic domain code (managed by composer, for packages with type=laravel-domain)
  • app/Module/<module> <= module code (managed by composer, for packages with type=laravel-module)
  • packages/<package>/ <= composer wil automatically pickup any packages in this directory. This allows to develop packages alongside your application (see packages/README.md)

It uses oomphinc/composer-installers-extender to install packages of type laravel-module/laravel-domain to the app/Module and app/Domain/vendor folders.

Docker compose support

This base install comes with a complete docker-compose setup out of the box. It assumes you have a working local docker install which allows access to docker for your own user.

To easily access the containers you should also run the thisisdevelopment/docker-hoster container (see https://github.com/thisisdevelopment/docker-hoster) to dynamically update your hosts file.

docker run --restart=unless-stopped -d \
    -v /var/run/docker.sock:/tmp/docker.sock \
    -v /etc/hosts:/tmp/hosts \
    thisisdevelopment/docker-hoster

Dev script

To easily access the containers you should use the included bin/dev script. This script allows for easy execution of composer etc inside your containers.

The supported commands are:

  • up
  • down
  • rm
  • deploy
  • logs
  • php-cli
  • composer
  • artisan
  • phpcs
  • phpcbf
  • phpunit

Coding standards

This base install enforces the PSR-12 code standard. It does this by installing a git-hook which enforces this standard (by means of phpcs)

laravel-tenants-example's People

Contributors

ederuiter avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

00mjk

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.