Structuring Laravel for larger projects

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!


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

Suggested courses


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

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

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

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

Build a Starter Kit With Inertia and Fortify

Let’s build our own Laravel starter kit with Inertia and include all the features you’d expect. We’ll implement authentication, email verification, profile photo uploads, two factor authentication, and more. Fortify is a frontend agnostic authentication package for Laravel, meaning most of the work is done for us — we just need to build the frontend and make requests to the endpoints that Fortify registers. Once you’re done, you’ll have a clean slate for building your next project, with the ability to control everything in your own starter kit.

40 episodes
5 hrs 21 mins