Code Flow
forked from flekay/code-flow
| Route / Method | Class | Responsibility | |----------------|-------|----------------| | `GET /create-recipe` | `RecipeCreateController::createPage()` | Renders `recipe-create.php` view with `main.js` and CSS assets. | | `POST /api/v1/recipes` | `RecipeController::create()` | Validates title/slug/visibility, calls `RecipeRepository::create()`, returns `{recipe_id, redirect_url}`. | | `RecipeRepository::create()` | `RecipeRepository` | Inserts a new `recipes` row with generated slug and minimal scalar fields. | | `RecipeRepository::generateSlug()` | `RecipeRepository` | Creates a URL-safe slug from the title, appending a counter on collision. |
Ingredients
- 500g Mehl
- 200ml Milch
- 3 Eier
- 100g Zucker
- 1 Prise Salz
- 50g Butter
- 1 Päckchen Vanillezucker
- 1 TL Backpulver