2017 © Pedro Peláez
 

project laravel-doctrine-project

Laravel 5.3 with Doctrine, Twig and other Goodies

image

somnambulist/laravel-doctrine-project

Laravel 5.3 with Doctrine, Twig and other Goodies

  • Tuesday, August 22, 2017
  • by dredfern
  • Repository
  • 1 Watchers
  • 4 Stars
  • 36 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 2 Open issues
  • 14 Versions
  • 0 % Grown

The README.md

Doctrine Laravel Project

A kick-starter project that pre-configures Doctrine, Twig, behaviours and some other stuff because bootstrapping projects with the same requirements is tedious., (*1)

Use this to kick-start a Doctrine based Laravel app., (*2)

  • 1.X Laravel 5.2.* based project
  • 2.X Laravel 5.3.* based project
  • 3.X Laravel 5.4.* based project

Included are the following:, (*3)

  • Barryvdh Debugbar
  • Barryvdh IdeHelper
  • Beberlei Assert
  • Doctrine
  • Doctrine Behaviours
  • Doctrine Domain Events
  • Doctrine Entity Audit
  • Doctrine Entity Validation
  • Eloquent Enumerations
  • Environment Loader
  • HTML Builder
  • Homestead
  • Twig
  • Twig Extensions

Entities

The default namespace is "App"., (*4)

The following entities and matching repositories are provided, together with YAML mapping files, pre-configured:, (*5)

  • Address
  • Country
  • Organization
  • Permission
  • Role
  • User

Each repository has an interface that is pre-mapped to the interface in the repository config., (*6)

Domain Events

The User and Organization entities support Domain Events:, (*7)

  • User Events
    • UserCreated
    • UserLoggedIn
    • AddressAddedToEntity
    • AddressRemovedFromEntity
    • AuthenticationCredentialsChanged
    • GrantedOrganizationToUser
    • GrantedPermissionToUser
    • GrantedRoleToUser
    • RevokedOrganizationFromUser
    • RevokedPermissionFromUser
    • RevokedRoleFromUser
  • Organization Events
    • OrganizationCreated
    • AddressAddedToEntity
    • AddressRemovedFromEntity

Getting Started

  • composer create-project somnambulist/laravel-doctrine-project my-project
  • setup your database settings / configure the other options
  • ./artisan doctrine:schema:validate
  • ./artisan doctrine:schema:create
  • ./artisan db:seed
  • ./artisan serve
  • to use Vagrant, update the Homestead.yaml with the project location
  • vagrant up
  • then use the artisan commands as above

The standard Laravel welcome app + authentication have been setup and converted to Twig., (*8)

Additional Helper Scripts

  • cache_build.sh - creates caches for routes, container etc.
  • cache_clean.sh - clears all caches including Doctrine query caches
  • vagrant_db_reset.sh - drops and rebuilds the database (for development only)
  • vagrant_refresh.sh - fully refreshes all applications files including composer update and npm install

The Versions