Snippets

Structuring Laravel for larger projects

Playing
Structuring Laravel for larger projects
21 mins6 years ago

You'll quickly outgrow the default Laravel structure as your app grows. Without much effort, let's look at some small changes that'll make a huge difference.

Alex Garrett-Smith
Hey, I'm the founder of Codecourse!

Comments

No comments, yet. Be the first to leave a comment.

Suggested courses

Laravel

Build An Uptime Monitor with Inertia

Ready to dive into Inertia? Let's build a real-world app with Laravel, Inertia and Vue! If you're already working with Inertia, you'll pick up some tips and techniques for future projects. This uptime monitor allows you to create and switch between sites, then add endpoints to monitor with frequency intervals. Using the power of scheduling and queues, it'll automatically alert the email addresses you've added via the UI when an endpoint goes down. In this course, you'll learn to: * Build a real app from scratch with Inertia * Work with Laravel queues * Perform actions on models at user-defined intervals * Work with sub-minute schedules in Laravel * Send out channel notifications with Laravel * Use API resources to simplify Inertia data * Organise apps with events and observers * Create modals in Vue * Perform inline editing with Inertia forms

44 episodes
4 hrs 59 mins
Laravel

Learn Inertia

Single-page applications are great, but they come with the challenge of maintaining two separate projects — the client and the API. Inertia serves as the solution, seamlessly connecting these two components and enabling you to build everything in one application (a monolith) while achieving the same outcome. The best part? You won't have to create an API. To be honest, when I first started working with Inertia, I was a little confused about how everything worked. If that sounds familiar, then this course is made for you. I'll guide you through everything you need to know to kickstart your journey in building single-page applications using Laravel, Inertia, and Vue.

28 episodes
2 hrs 20 mins
Laravel

Create an AI chat bot with Livewire and ChatGPT

Let’s learn how wire:stream can help us stream ChatGPT responses as they arrive, by building a chat interface with Livewire. Each message we send and receive will be shown in chat history. It even remembers the conversation context. Sure, there are a ton of ChatGPT wrappers out there, but by the end of this course, you’ll have wire:stream in your toolkit for future projects.

6 episodes
29 mins
Laravel

Laravel Actions

Actions are single classes that do *one thing*. Laravel Actions is a package that allows you to run these classes as *anything* you want, whether it's a controller, listener, console command – or just on its own. Keeping your app structure to single classes like this lets you focus on what your app does rather than the design decisions around controllers, listeners and commands. Single actions are also easier to test, and we'll also cover that! This course is for you if: * You'd like to try a fresh approach to structuring your apps * Your app shares logic, and you'd like to combine this logic into one class that runs anywhere * You've heard of (or used) Laravel Actions, and you'd like a run-through

12 episodes
1 hr 2 mins
Laravel

Soketi Basics

Learn to broadcast events in realtime with Soketi, a simple, fast, and resilient open-source WebSockets server. In this course, we'll set up a Soketi server, configure Laravel for Soketi, and create events for public and private channels. Then, we'll listen for these events on the client and dump the payload from the server. If you need realtime events in your app, this course will get you up and running in no time.

5 episodes
26 mins