Introducing Scout Extended
– Edit
Last month at the Laravel PHP Paris meetup, Nuno Maduro introduced his newest package called Scout Extended.
– Edit
Last month at the Laravel PHP Paris meetup, Nuno Maduro introduced his newest package called Scout Extended.
– reinink.ca – Edit
Jonathan Reininck wrote a cool article on how you can create dynamic releationships. This technique will keep the number of queries and the memory used to a minimum.
I hope that gives you a good overview of how you can use subqueries to create dynamic relationships in Laravel. This is a powerful technique that allows you to push more work into the database layer of your app. This can have a huge impact on performance by allowing you to drastically reduce the number of database queries executed and overall memory used.
Read more [reinink.ca]
Join 9,500+ smart developers
Get my monthly newsletter with what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.
No spam. Unsubscribe anytime. You can also follow me on X.
"Always fresh, useful tips and articles. Carefully selected community content. My favorite newsletter, which I look forward to every time."
– twitter.com – Edit
Did you know that you can define a $dispatchesEvents property on your Eloquent model and map native Eloquent events to your own event classes? ? Check this out: pic.twitter.com/P205GTIYEc
— Laravel Docs Daily (@laradocsdaily) November 24, 2018
Read more [twitter.com]
by Freek Van der Herten – 5 minute read – Edit
I've been using PhpStorm for quite some time now, but never took the effort to fix a few minor annoyances I had with it. Getting rid of the default comment for new PHP files First up, when creating a new PHP file or class you PhpStorm will add this comment block like this by default: /** * Created…
– twitter.com – Edit
?️ Use "declarative" (the state of the thing) names for your data attributes in Vue over "imperative" (an action to take on the thing) pic.twitter.com/LJk2MRT0Bw
— Caleb Porzio (@calebporzio) November 19, 2018
Read more [twitter.com]
by Freek Van der Herten – 1 minute read – Edit
Here's a video of Surma having technical problems while presenting his State of Houdini talk. Luckily Jake Archibald and others "help" him out ? No matter how well you prepare a talk, you can always have technical difficulties. If you handle the failure gracefully, the public won't mind.…
– calebporzio.com – Edit
Caleb Porzio, developer at Tighten Co, recorded a video that explains how to publish a Vue component as a package
If you're like me, you have a handful of useful Vue components you use between different projects. Many times I've wanted to publish an individual Vue component to NPM for myself and others to access more easily.
Read more [calebporzio.com]
– Edit
This year Laracon AU was held for the very first time. According to what I read on Twitter Michael Dyrynda did an awesome job organising it.
The organisation was so kind to record all talks. They are now available on YouTube. You'll find all talks in this playlist.
Below you can see the talk titled "Abusing Laravel for Fun and Profit" by David Hemphill
by Freek Van der Herten – 24 minute read – Edit
At Spatie we have a tv screen against the wall that displays a dashboard. This dashboard displays the tasks our team should be working on, important events in the near future, which tasks each of our team members should be working on, what music they are listening to, and so on. Here's what it looks…
– twitter.com – Edit
Q: how many api calls do you need to do in #PHP to determine if the ☀️ is up?
— Freek Van der Herten (@freekmurze) November 14, 2018
A: 0 pic.twitter.com/glaZQZ4mQ9
Read more [twitter.com]
by Freek Van der Herten – 3 minute read – Edit
Let's take a look at how you can define routes to controllers in Laravel. By default you can do it like this: Route::get('my-route', 'MyController@index'); This will look for the MyController class in the App\Http\Controllers namespace. This default namespace is set up in Laravel's…
by Freek Van der Herten – 10 minute read – Edit
The past few years I visited and spoke at a lot of PHP conferences. PHP Benelux, Laracon EU and US, PHP UK Conference, PHP World are only a few of the conferences I thoroughly enjoyed. Visiting those conferences can be recommended to anyone interested in PHP. Regardless of which level you're at…
– timacdonald.me – Edit
There are three ways of loading relationships in Laravel. Tim MacDonald, a freelance dev based in Sydney, explains them all.
It is often useful to show the number of related models a given instance has, but not actually need any specific information about the related models, just how many exist. In this scenario you do not want to load all of the related models into memory to count them, we want our database to do the heavy lifting for us. Laravel offers a number of ways to retrieve relationship counts.
Read more [timacdonald.me]
by Freek Van der Herten – 2 minute read – Edit
Invokables in PHP are classes that you can use as a function. They have been around since PHP 5.3 and have many interesting use cases. Here's a quick example. class Invokable { public function __invoke() { echo 'I have been invoked'; } } You can use it like this: // outputs 'I have been…
– zaengle.com – Edit
Woodworker/developer Jesse Schutt clearly explains how to use v-model properly on nested components.
Building a custom component that operates on chunks of data is easier than you may think. It involves understanding how Vue handles the input/update cycle and making a few changes to your component. Let’s start by taking a look at one approach for turning a standard component into a “controlled” component and then figure out how to nest them.
Read more [zaengle.com]
Some solid advice from Adel Faiz: do not use a package for authorization unless you really need its functionalities. Laravel's default authorization capabilities are good enough for most use cases.
I don't want to say these packages are useless. They can be useful for projects which needs complicated authorization system, which should be customizable by customer later. Also some projects need dynamic permissions. For all other projects it's too heavy solution. Better to use simple code-based authorization.
Read more [adelf.pro]
– Edit
A couple of week ago I wrote a blogpost that contains all the software, hardware and settings I use. I've seen a couple of devs writing the same kind of post. Here are some of them:
Did you write down your setup as well? Post a link in the comments below! ?
The last couple of weeks soem strange Imagick errors popped up across all our servers. In a new blogpost my colleague Alex explains the cause and the fix.
Over the last few days we've had a couple of issues with Imagick and processing PDFs on our servers. As it turns out, these issues are caused by automatic security updates. Let's look into the issue and its solution.
Read more [alexvanderbist.com]
– ohdear.app – Edit
Oh Dear!, the monitoring service that my buddy Mattias and I run, now has the ability to auto import sites from Forge.
Forge recently introduced a feature called tags, whichs allows you to add custom tags to any server or site in Forge. We use those tags to determine which sites we should automatically add to your Oh Dear! Account. Every site or server tagged with oh-dear will be added. This allows you to still pick which sites should - or should not - get monitored.
Read more [ohdear.app]
Nick Janetakis shares three tools that come in handy when developing locally.
When developing real world applications you tend to run into certain road blocks such as:
Read more [nickjanetakis.com]