📊 Capítulo 01: Ecossistema Laravel 11 & Artisan
Especialização Backend com PHP & Laravel
🗺️ O Ciclo de Vida da Requisição no Laravel 11
flowchart TD
CLIENT["Navegador / Cliente HTTP (public/index.php)"]
--> AUTOLOAD["Composer Autoloader & bootstrap/app.php"]
--> SERVICE_PROV["Registro e Boot de Service Providers (IoC Container)"]
--> ROUTER["Roteamento HTTP (routes/api.php)"]
--> GLOBAL_MW["Pipeline de Middlewares Globais"]
--> CONTROLLER["Controller / FormRequest Validation"]
--> RESPONSE["Response HTTP (JSON Resource / 200 OK)"]
style CLIENT fill:#ede7f6,stroke:#512da8,stroke-width:2px
style AUTOLOAD fill:#fff3e0,stroke:#ff9800,stroke-width:2px
style SERVICE_PROV fill:#e8f5e9,stroke:#4caf50,stroke-width:2px
style ROUTER fill:#e1f5fe,stroke:#03a9f4,stroke-width:1.5px
style GLOBAL_MW fill:#ffebee,stroke:#d32f2f,stroke-width:1.5px
style CONTROLLER fill:#c8e6c9,stroke:#2e7d32,stroke-width:2px
style RESPONSE fill:#e0f2f1,stroke:#00897b,stroke-width:1.5px
🎯 Slide 1: A Nova Estrutura Simplificada do Laravel 11
-
bootstrap/app.phpUnificado: Configuração centralizada de roteamento, middlewares e exception handlers sem dezenas de classes de Kernel. -
PHP 8.3 Mandatório: Tipagem estrita de retorno, Typed Class Constants e atributos nativos.
- Zero Boilerplate: Menos arquivos gerados por padrão e foco na produtividade do desenvolvedor.
🎯 Slide 2: O Poder do Artisan CLI
-
php artisan make:model Produto -mcrR: Cria Model, Migration, Controller RESTful e Form Requests em um único comando! -
php artisan tinker: Console REPL interativo com acesso direto ao banco e IoC container. php artisan optimize: Compila rotas, configurações e views para performance máxima em produção.
🎯 Slide 3: Inversão de Controle & Service Container
- O Service Container do Laravel resolve dependências por reflexão em construtores automaticamente (Zero Configuration DI), suportando Singletons, Bindings e Contextual Bindings.
Slide 1 de 1
Atalhos: ← → Navegar • Espaço Avançar • F Tela Cheia • Home Início • End Fim