# Structure - `app` => fichiers php (classes) - `bootstrap` => fichiers de démarrage (on n'y touche pas) - `config` => options de config - `database` => fichiers de migration et seeds - `public` => fichiers accessibles au public (index.php, css, js, images) - `resources` => fichiers de ressources (vues, js, sass my goat, etc.) - `routes` => fichiers de routes de l'app - `storage` => logs, cache - `tests` => tests de l'app (automatisés) - `vendor` => le dossier de composer (on n'y touche pas) # Commandes PHP Artisan (Docker) - Créer une migration => `php artisan make:migration create_nom_table` - migration => `php artisan migrate:fresh` - seeder => `php artisan db:seed --class=NomSeeder` php artisan make:model Categorie --migration -a php artisan make:model billet_categorie -m ```sql use laravel_db; INSERT INTO billet_categorie (id, billet_id, categorie_id, created_at, updated_at) VALUES (1, 1, 1, NULL, NULL), (2, 1, 2, NULL, NULL), (3, 1, 10, NULL, NULL), (4, 2, 3, NULL, NULL), (5, 3, 9, NULL, NULL), (6, 4, 1, NULL, NULL), (7, 4, 4, NULL, NULL), (8, 5, 5, NULL, NULL), (9, 6, 7, NULL, NULL), (10, 7, 1, NULL, NULL), (11, 8, 10, NULL, NULL), (12, 9, 6, NULL, NULL), (13, 10, 8, NULL, NULL); ```