Code Explainers
Code explainers tagged #domain modeling
ruby
class Order < ApplicationRecord include AASM belongs_to :warehouse
Modeling an order lifecycle with AASM in Rails
state machine
guards
callbacks
Intermediate
10 steps
php
<?php namespace App\Models;
How Eloquent scopes model order status in Laravel
query scopes
state machine
eloquent
Intermediate
7 steps
python
from fastapi import FastAPI, Request, status from fastapi.responses import JSONResponse app = FastAPI()
Custom exception handlers in FastAPI
exception handling
error responses
separation of concerns
Intermediate
7 steps