Execute Eloquent methods without firing events
A little helper method I put on my base Model class on Secret Project VI… Kinda handy. ?♂️ pic.twitter.com/mPOMV73d5L
— Taylor Otwell ? (@taylorotwell) April 30, 2019
Read more [twitter.com]
Posts tagged with php
A little helper method I put on my base Model class on Secret Project VI… Kinda handy. ?♂️ pic.twitter.com/mPOMV73d5L
— Taylor Otwell ? (@taylorotwell) April 30, 2019
Read more [twitter.com]
Brent lists the goodies coming to PHP 7.4, which will be released in december. This is going to be an epic release!
Read more [stitcher.io]
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.
"Freek publishes a super resourceful and practical newsletter. A must for anyone in the Laravel space"
???
— Jeff Ochoa (@Jeffer_8a) April 24, 2019
A small trait to run use progression bars in @laravelphp commands#Laravel #PHP pic.twitter.com/lvGylb5QXm
Read more [twitter.com]
Recently we've released v2 of laravel-event-projector. The package is probably the easiest way to get started with event sourcing in Laravel. In v2 we've introduced two "invisible" features that improve the developer experience: auto-detection of event handling methods and auto-discovery of event handlers.
Recently we've released v2 of laravel-event-projector. The package is probably the easiest way to get started with event sourcing in Laravel.
One of the prominent new features is support for aggregates. While creating v2, I found it surprising that such a powerful concept could be implemented in so little code. In this short blog post, I'd like to explain how aggregates are coded up.
In a Laravel app policies are a great way to organize authorization logic that revolves around models.
For the longest time, I've been using Gate::before to allow superadmins to do anything they want. While working on a new app, it finally clicked how Gate::after can be useful too. I'd like to share that knowledge in this blog post.
In this blog post, I'd like to highlight two tips to make controllers in Laravel feel much lighter.
Grégoire Pineau explains how you can find the source of a segfault in PHP.
Sometimes, a segfault happens, but you don’t know where, and your PHP installation does not have tools to find it. Or sometime, you think PHP is hanging, but you don’t know where. You may use xdebug, but you don’t want to click so many times on the « next call » button.
Read more [jolicode.com]
?? Laravel Core Adventures - Did you know?
— Christoph Rumpel ? (@christophrumpel) April 17, 2019
In Laravel, we can access related data as if we would call a class property. But in fact, this is just a shortcut/hack for using the relationship method we have defined.
The second approach has one advantage, your IDE can follow it. pic.twitter.com/OjL4zNqUnp
Read more [twitter.com]
It's a bit of a click baity title, but reading it I learning that all PHPUnit's asserts have a function equivalent.
During the preparation of TDD workshops, I began to think about how to write assertions. It turns out that there are several possibilities, but is there the only correct one?
Read more [arkadiuszkondas.com]
My colleague Brent offers some more details on the intricacies of Laravel's query builder.
I recently learned that not all query builder functionality in Laravel is "safe". This means that user input shouldn't be passed directly to it, as it might expose your application to SQL injection vulnerabilities.
Read more [stitcher.io]
Our laravel-query-builder package exposed a serious security issue: it allowed SQL injection attacks. Laravel Query Builder v1.17.1, which is now available, fixes the vulnerability. If you're using the package, stop reading now and upgrade to the latest version first. For Laravel 5.6, 5.7 and 5.8…
Laravel event projector is a package that aims to be the entry point for event sourcing in Laravel. It can help you setting up aggregates, projectors and reactors. Earlier today our team released v2. This version streamlines the projectors and reactors from v1 and adds support for aggregates.
In this blogpost I'd like to explain a potential problem with traditionally built applications. After that we'll take a look at what projectors and aggregates are. Finally we'll walk through an example how you can create an aggregate laravel-event-projector.
It's a minor thing but PHP's `isset` can accept multiple vars which will allow you to simplify your code. ? pic.twitter.com/GBgYEDSOya
— Eric L. Barnes (@ericlbarnes) April 4, 2019
Read more [twitter.com]
KH. Jebran Ali lists a few cool Laravel tricks
Laravel is full of hidden gems that I have discovered during working on different tasks. Some of these gems were less-known or un-documented features, functions parameters and hacks. In this blog post I will share those hidden gems with you, let’s get started.
Read more [meramustaqbil.com]
PHP UK is one of my favourite conferences. Unfortunately I couldn't make it this year, but I'll be sure to watch the videos that have been published a little while ago.
Here's a cool session on running PHP on AWS Lamba by Neal Brooks
You can watch all other talks in this playlist on YouTube.
? Here's an undocumented hidden @laravelphp gem. Did you know you there's a shorter way to retrieve models in a chunked way? ?https://t.co/Vj74GAfAAr#laravel #php pic.twitter.com/qcVr5bCqGZ
— Freek Van der Herten ? (@freekmurze) March 25, 2019
Read more [twitter.com]
Matt Allan took a deep dive learning about environment variables.
Laravel, Symfony, and other modern PHP frameworks use environment variables to store security credentials and configuration that changes from one machine to the next. ... Let’s break down what environment variables are, how they work, and how to correctly use them in your code.
Read more [mattallan.me]
How to test something you are pulling OUT of Storage.
— Jake Bennett (@JacobBennett) March 19, 2019
Typically Laravel Storage testing is comprised of asserting that you put something IN Storage. If you happen to be pulling something down from a Storage disk and doing some processing on it, this has been helpful. pic.twitter.com/VjSqo914US
Read more [twitter.com]
Anna Filina explains the handy platform option you can use in composer.json. It's a good idea to just use this in all of your projects.
Say you run the latest PHP version on your machine, but the server runs PHP 5.5. This means that when you decide to add a Composer package, it might propose a version that may not be installable on the server. The solution is surprisingly easy. You can instruct Composer to see the PHP version of your choosing.
Read more [afilina.com]