Group by raw with boolean condition in Eloquent
Link – – laraveldaily.com
Povilas Korop explains how to use a raw groupBy in Laravel. Cool!
Read more [laraveldaily.com]
Oh Dear is the all-in-one monitoring tool for your entire website. We monitor uptime, SSL certificates, broken links, scheduled tasks and more. You'll get a notifications for us when something's wrong. All that paired with a developer friendly API and kick-ass documentation. O, and you'll also be able to create a public status page under a minute. Start monitoring using our free trial now.
Link – – laraveldaily.com
Povilas Korop explains how to use a raw groupBy in Laravel. Cool!
Read more [laraveldaily.com]
Tweet – – twitter.com
One great way to keep your @laravelphp test factories clean is by creating custom faker providers that you can use to create custom fake data, whenever you need to fake something that the built-in faker does not yet support. pic.twitter.com/kwwuevuUf9
— Marcel Pociot (@marcelpociot) March 5, 2019
I write about Laravel, PHP, AI and building better software.
Every two weeks, I share practical tips, tutorials, and behind-the-scenes insights from maintaining 300+ open source packages. Join thousands of developers who read along.
No spam. Unsubscribe anytime. You can also follow me on X.
Link – – matthiasnoback.nl
Matthias Noback makes the case for writting your own service containers.
Dependency injection is very important. Dependency injection containers are too. The trouble is with the tools, that let us define services in a meta-language, and rely on conventions to work well. This extra layer requires the "ambient information" Paul speaks about in his tweet, and easily lets us make mistakes that we wouldn't make if we'd just write out the code for instantiating our services.
Read more [matthiasnoback.nl]
Link – – medium.com
Zander Nethercutt provides some great insights in the mechanisms in play that can lead to burnout.
When we see long weekends and think “work before play,” when we see Friday nights and think “sleep before clubs,” when we see escalators as accelerators and not opportunities to “just take a second,” we’re nothing more than hyperrational prisoners making a decision that would be inaccurately characterized as a dilemma because the answer is obvious.
Read more [medium.com]
Link – – www.christianscheb.de
I was quite surprised to learn that it could make sense to run PhpStorm on the server too.
Did you know that PHPStorm (or any other Jetbrains IDE) can run inspections from command line and generate XML files for the results? This is a great “hidden” feature of those IDEs and machine-readable output means it can be somehow integrated with a continuous integration (CI) process. So let’s do this!
Read more [www.christianscheb.de]
Tweet – – twitter.com
? Laravel tip: Use your defined Eloquent relationships when you Factory models.
— Rasmus C Nielsen (@rasmuscnielsen) March 4, 2019
This can save you many lines of code and make your tests much more eloquent.
Simply install this package: https://t.co/6XNeQZk40T pic.twitter.com/f4T5xayL5X
Link – – lornajane.net
Lorna Jane gives a good overview of the tools available when working on an API.
As Web Developers, we need to know how to work with HTTP from every angle. I gave a 2-hour tutorial at PHP UK that included some of my most trusted tools - but it was sold out and a bunch of people asked me if there was video (there wasn't, tutorials make little sense when videoed). Instead, I thought I'd try to set out a self-study version of the workshop (I rarely teach these days so I'm unlikely to deliver it anywhere else).
Read more [lornajane.net]
Tweet – – twitter.com
Here's a neat trick for soft deleting relationships in @laravelphp. ?
— Jonathan Reinink (@reinink) February 27, 2019
When you delete a record, immediately also soft delete any child records. ?
Later, when you restore the parent, automatically also restore all child records that were deleted when the parent was deleted. ? pic.twitter.com/YsYKWtu00R
Link – – motherboard.vice.com
The issue of whether there is a generalized sustainability crisis in open source is a contentious one, but that doesn’t obviate the need to find a solution for open source projects that do struggle to find funding and volunteers to support development. Whether these are marginal examples or a rising epidemic, the fact that they continue to work on open source projects in spite of this shortcoming is a testament to their dedication to the goals of the project and open source development more generally. Yet most developers are in agreement that if there are ways to sustainably fund the open source community, this will ultimately lead to even better software.
Read more [motherboard.vice.com]
Link – – stevehanov.ca
In an older but still post, Steve Hanov explains a nice algorithm to test out new features on your audience. I don't now if this approach will yield better results, but it sure is an interesting idea.
In recent years, hundreds of the brightest minds of modern civilization have been hard at work not curing cancer. Instead, they have been refining techniques for getting you and me to click on banner ads. It has been working. Both Google and Microsoft are focusing on using more information about visitors to predict what to show them. Strangely, anything better than A/B testing is absent from mainstream tools, including Google Analytics, and Google Website optimizer. I hope to change that by raising awareness about better techniques.
Read more [stevehanov.ca]
Here's a presentation from the Netflix engineering team on how they made the interface for Netflix' interactive movie Bandersnatch.
Link – – reinink.ca
Jonathan Reinink proposes a new take on what Vue's role could be in a server rendered app.
What I have here is a classic server-side app, that uses server-side routing and controllers. There is no API. The controllers lookup the data from the database, and then pass it to the templates. Except, I'm not using any server-side (ie. Blade) templates. Instead I'm doing full client-side rendering using Vue.js. Confused yet? Let me explain.
Read more [reinink.ca]
Link – – github.com
Dan Ackroyd maintains this interesting repo on GitHub with thoughts on why some PHP RFC's are not implemented yet. High on on my wishlist: Briefer closure syntax and Generics
There are some notes on PHP RFCs, why some were declined, and what others might need for them to be implemented. The purpose of these documents is to avoid information from being lost and to try to avoid conversations needing to be repeated multiple times on PHP internals.
Read more [github.com]
Link – – blog.honeybadger.io
Over at the Honeybadger blog, Starr Horne wrote an interesting article on the different types of UUIDs and ULIDs.
UUIDs are and will continue to be the standard. They've been around forever, and libraries are available in every language imaginable. However, new approaches are worth considering, especially as we enter a world that's increasingly run by distributed systems. New unique-id approaches may help us solve problems that weren't prevalent at the publication of RFC4122.
Read more [blog.honeybadger.io]
Link – – stitcher.io
Recently we released a new package called enum. In a new post on his blog Brent tells you what the benefit of working with enums is and how our package differs from the alternatives.
Today I want to explore some of the difficulties we encounter when solving problems like enums in userland. I'll talk about my personal take on enums, and we'll ponder on core support.
Read more [stitcher.io]
Tweet – – twitter.com
? laravel-web-tinker now has an auto theme. Currently it only works in Safari Technology preview. Hopefully support for this will come to the stable editions of all major browsers. Thanks @willemvbockstal for the PR! ?https://t.co/gbUvh4nIIwhttps://t.co/jwDKHsgtur
— Freek Van der Herten (@freekmurze) February 12, 2019
Tweet – – twitter.com
How to do PHP... Mission Impossible style. ? pic.twitter.com/KpJRqRmuyq
— SammyK, (@SammyK) February 12, 2019
Tweet – – twitter.com
⚠️ Make sure to always use the right types when querying (Eloquent version) ⚠️#laravel #php #mysql #castingisfun pic.twitter.com/TMnjYbuoCe
— Freek Van der Herten (@freekmurze) February 10, 2019
Link – – marcelpociot.de
Marcel Pociot recently released another awesome package: laravel-mailbox. In a new post on his blog he guides us through the code.
Read more [marcelpociot.de]
Link – – calebporzio.com
Caleb Porzio created a new Laravel package with a couple of very usefull functions.
I packaged up all the helper functions I use in my projects. They are cool. You can install it by running composer require calebporzio/awesome-helpers.
Read more [calebporzio.com]