Skip to content

Instantly share code, notes, and snippets.

@ffmit
Last active September 27, 2019 07:30
Show Gist options
  • Save ffmit/273dba845a5039de0986e9d550ba1d92 to your computer and use it in GitHub Desktop.
Save ffmit/273dba845a5039de0986e9d550ba1d92 to your computer and use it in GitHub Desktop.
Laravel - Plural vs. Singular
Model ------- Singular -- (e.g. app/Car.php)
Controller -- Singular -- (e.g. app/Http/Controllers/CarController.php)
Table ------- Plural ---- (e.g. "cars")
Factory ----- Singular -- (e.g. database/factories/CarFactory.php)
Seed -------- Plural ---- (e.g. database/seeds/CarsTableSeeder.php)
PivotTable -- Singular -- (e.g. car_dealer, for a connection between cars and dealers tables)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment