Commands

Overview

Every Artisan command Laravel OSDD registers.

Project commands

CommandDescription
osdd:startConvert a fresh Laravel project to layers
osdd:layerCreate a layer and register it in the root composer.json
osdd:listList the layers with their providers, requirements, file counts and health
osdd:checkCheck that each layer only uses the layers it requires, and that no requirements form a cycle
osdd:graphPrint the layer graph in Mermaid, DOT or JSON
osdd:seedRun the seeders registered by every layer, or by some layers
osdd:phpunitSync phpunit.xml with the test suite and source directory of each layer
osdd:removeRemove a layer that no other layer requires
osdd:cache, osdd:clearCache the discovered layers, or remove that cache

php artisan about --only=osdd shows the discovered layers, the migration paths and the number of registered seeders:

  OSDD .............................................................
  Layers ........................................................ 2
  Migration paths .... functional/users/database/migrations, technical/osdd/database/migrations
  Seeders ....................................................... 1
  functional/users ..................................... functional/users
  technical/osdd ......................................... technical/osdd

Laravel sorts the rows. php artisan about --only=osdd --json puts them under the o_s_d_d key: layers, one key per layer, migration_paths and seeders.

Generators

Every make:* generator of Laravel has an osdd:* twin that writes the file inside a layer:

php artisan osdd:model Order --layer=functional/orders
CommandLaravel twin
osdd:cache-tablemake:cache-table
osdd:castmake:cast
osdd:channelmake:channel
osdd:classmake:class
osdd:commandmake:command
osdd:componentmake:component
osdd:configmake:config
osdd:controllermake:controller
osdd:enummake:enum
osdd:eventmake:event
osdd:exceptionmake:exception
osdd:factorymake:factory
osdd:interfacemake:interface
osdd:jobmake:job
osdd:job-middlewaremake:job-middleware
osdd:listenermake:listener
osdd:mailmake:mail
osdd:middlewaremake:middleware
osdd:migrationmake:migration
osdd:modelmake:model
osdd:notificationmake:notification
osdd:notifications-tablemake:notifications-table
osdd:observermake:observer
osdd:policymake:policy
osdd:providermake:provider
osdd:queue-batches-tablemake:queue-batches-table
osdd:queue-failed-tablemake:queue-failed-table
osdd:queue-tablemake:queue-table
osdd:requestmake:request
osdd:resourcemake:resource
osdd:rulemake:rule
osdd:scopemake:scope
osdd:seedermake:seeder
osdd:session-tablemake:session-table
osdd:testmake:test
osdd:traitmake:trait
osdd:viewmake:view

See Generators for the --layer option and the files each one writes.