Laracon EU - Madrid

Laracon EU - Madrid

Author: Sacha Corazzi — Read time: 2 mins

Back in May (was it already that long ago?! 😩), we touched down in the Spanish capital, ready to hit the city’s inaugural Laracon EU Madrid. We started with a bit of exploring, then caught up on some missed sleep from our early flight, before preparing ourselves for the conference.

Laracon is a conference held each year across the world, mainly focusing on the Laravel PHP framework, whilst also covering topics from front-end web development through to security and design.

Speakers from every discipline share their knowledge and ideas to provide immediately actionable content to the attendees – in other words, stuff we can actually put to use now for clients such as T2.

There were lots of interesting talks that had a lot to offer, but we won’t go over all of them here. We did have a few choice favourites, however, – ones we thought we could take the ideas and concepts from, and make changes to what we’re currently working on.

Supercharging Common Controllers

Freek Van der Herten

@freekmurze

Even as I write this, Kieran’s busy working with a concept that Freek talked about: actions. The basic idea behind this is encapsulating individual actions (would you believe?) and any of its side effects into reusable classes.

In the example Kieran’s working on at the minute, an action is “DeleteEvent”. An event to be deleted is passed to the action and it defers to the relevant services to complete the task.

“Deleting an event” is a multi-step process, though. It requires API calls and database lookups and all sorts of logic that just… doesn’t really belong in a controller method. Therefore, we put them into action objects.

A 4- or 5-line (or potentially more 🤭) method can now be refactored to something along these lines:

<?php

public function deleteEvents(Venue $venue, DeleteEventsAction $deleteEvents): Response {

$deleteEvents->for($venue)->execute();

return response(‘OK’, 200); }

That’s nicer.

Multi-tenancy in Laravel

Julien Bourdeau

@julienbourdeau

Multi-tenancy describes a software architecture in which a single instance of an app runs on a server but serves multiple tenants in isolation. To give a basic example, think of something like a contract management system – there’s one codebase for the application, but multiple companies (tenants) have their own environments with their own user accounts that have their own documents that are isolated from each other.

We have a few systems that could be described as multi-tenanted, but using Julien’s talk and code as inspiration, we’ve started thinking about how we can make improvements to the existing architecture. We’re also considering how we can start paving the way for potential future features now, rather than having to try and shove square-shaped pieces into triangular holes later.

Advanced Vue Components

Adam Wathan

@adamwathan

Vue is a powerful and progressive Javascript framework. The ‘progressive’ part simply means you can start introducing Vue components into your project on an as-and-when basis, rather than having to rewrite your entire frontend to make it fit. For us, that means we’re able to take a step back and look at our existing projects for areas that can be improved by Vue, and even where we can start improving existing Vue elements.

Adam’s talk focuses on that last part – how can we take what we’ve already got and make it better? In particular, how can we avoid repeating ourselves? Vue is great for encapsulating logic and making it portable. Rather than tying the logic to a specific element on a webpage or app, he demonstrated how easy it is to write reusable components that can essentially be wrapped around others in just a few lines of code. This makes them easier to maintain, meaning we save time (and money) and potentially a lot of headaches and rewriting over the lifetime of a project.

He’s expanded the talk into an entire online course, which we’re eager to get started on. If you’re interested, check out Advanced Vue Component Design . Be quick! As I’m writing this, there’s 40% off the entire cost of the course.

So, that’s our roundup of some of our favourite talks at Laracon EU this year.

We learned a lot during our time in Madrid, much of which we can apply to both our current and upcoming projects. We’ve been sure to share that knowledge with the rest of the team here at Strawberry, and are already looking forward to next year’s event so we can learn a whole lot more!

Were you at Laracon EU? What was your favourite talk? Hit us up @Strawberry on Twitter and let us know what you thought!