A comprehensive talk about writing better Laravel code by focusing on proper use of Eloquent ORM features. The speaker discusses model defaults, relationship management, custom collections, and report generation patterns. He emphasizes the importance of making code readable and semantic, using real-world furniture-making analogies to illustrate concepts of craftsmanship in software development.
The speaker presents a practical guide to understanding and implementing design patterns in Laravel applications. Starting with a story about a junior developer struggling with the Gang of Four design patterns book, he demonstrates how to make patterns more accessible by showing real-world implementations of the Adapter, Strategy, and Factory patterns using Laravel examples. The talk focuses on practical refactoring techniques and how to properly structure code using these patterns.
The speaker discusses how to write more declarative code in Laravel by refactoring common patterns found in controller actions. Using examples shared on Twitter as inspiration, he demonstrates how to transform verbose, imperative code into cleaner, more declarative alternatives using Laravel's built-in features like form requests, policies, mutators, and real-time facades. The talk focuses on practical refactoring techniques to reduce branching logic and improve code readability.
The talk covers practical implementations of AI in Laravel applications, focusing on two example projects: 'Ask the Docs' (a semantic search tool for Laravel documentation) and an AI assistant chatbot. The speaker explains key AI concepts including prompting, vector embeddings, and retrieval augmented generation (RAG), while providing code examples and practical implementation details for developers looking to integrate AI into their Laravel applications.