Customize validation error messages in a form request
? In @laravelphp you can customize validation error messages in a form request ? pic.twitter.com/8XFUeuqFOT
— Freek Van der Herten ? (@freekmurze) July 10, 2019
Read more [twitter.com]
Posts tagged with laravel
? In @laravelphp you can customize validation error messages in a form request ? pic.twitter.com/8XFUeuqFOT
— Freek Van der Herten ? (@freekmurze) July 10, 2019
Read more [twitter.com]
Earlier this year we released v2 of laravel-event-sourcing. This package is probably the easiest way to getting started with event sourcing in Laravel. A significant feature of v2 was the addition of aggregates.
Today we released another new version of the package that adds test methods. These methods allow you to verify if the aggregate behaves correctly. In this post, I'll show you an example and explain how the test methods are implemented.
These test methods were inspired by the awesome testing methods Frank De Jonge made in his Eventsauce package.
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."
Jason McCreary, creator of Laravel Shift, wrote a post mortem on a problem where too many mails were sent.
It was 7:07 am. I woke up to 56 emails, 17 tweets, 9 Slack messages, and 4 telegrams. All of which alerting me my SaSS product had sent 3,625 email messages to 1,544 users overnight. I am Jack's cold sweat. ?
Read more [jasonmccreary.me]
And if you're a @laravelphp user wondering how you can use this feature, you can easily extend the query builder to support this. ?
— Jonathan Reinink (@reinink) July 16, 2019
Gist here: https://t.co/Wuavz0v7p9 pic.twitter.com/Vy6NJdJbcx
Read more [twitter.com]
The comment section of this blog used to be powered by Disqus. At its core, Disqus works pretty well. But I don't like the fact that it pulls in a lot of JavaScript to make it work. It's also not the prettiest UI. I've recently replaced Disqus comments with webmentions. If you reply to, like or…
Jason McCreary wrote an epic blogpost on how to get started with tests in a Laravel app. I wish I could have read this when I started out with testing.
This brings me to the next common response, we don’t know where to start testing. This comes in two forms. The first form is quite literally we don’t know which test to write first. The second form is more not knowing how to write the first test. ... Today, I want to focus on getting started with testing your Laravel applications.
Read more [jasonmccreary.me]
Tim MacDonald, a freelance software developer based in Sydney, investigates how to make Laravel tests run faster. Turns out you a lot can be gained by caching the config.
I saw a conversation on Twitter the other day discussing how Laravel was slowing down a test suite. I decided I wanted to dig into this and see if there was anything to it.
Read more [timacdonald.me]
A nice little tip to clean up your code base from boolean flags (is_active, is_deleted, is_subscribed) is to switch to nullable timestamps instead.
— Marcel Pociot ? (@marcelpociot) July 2, 2019
You remain the same flag functionality, but get the point of time for free. pic.twitter.com/86iHt6ow0X
Read more [twitter.com]
? The fundamental key to understanding Eloquent. pic.twitter.com/WkaKIFaeOR
— Caleb Porzio (@calebporzio) July 1, 2019
Read more [twitter.com]
Simon Kollross explains how to use our laravel-backup package to create an encrypted backup of your Laravel based app.
You should always encrypt backups of your apps and securely transfer them to one or multiple backup destinations. If you encrypt the backups on your server and transfer only the encrypted version, your backups are stored encrypted at rest in your backup destination. Not even your backup storage provider is able to read them.
Read more [simonkollross.de]
Recently Jeffrey Way published a video titled "Frontend Authorization Brainstorming" on Laracasts. In that video, he shows three ways of passing authorization results to the front-end.
Currently I'm working on a big project that uses Inertia, React and TypeScript. In this blog post, I won't cover those things in detail, but I'd like to show you have we, using those technologies, pass authorization (and routes) to the front-end.
Liam Hammett created a cool package to easily create Blade Helpers in Laravel.
I put together a package that attempts to help make these helper functions that little bit easier to define without the boilerplate of returning the string or having to consider what an expression may be when creating a Blade directive.
Read more [liamhammett.com]
A webhook is a mechanism where an application can notify an other application that something has happened. Technically, the application sends an HTTP request to that other application. In this blog post, I'd like to introduce you to two packages that we recently released. The first is laravel-webhook-server, which allows you to send webhook requests. The second one is laravel-webhook-client, which makes it easy to receive those webhook request.
In the project that @freekmurze and I are working on, I needed the ability to replicate an existing Eloquent model into a different Eloquent model.
— Marcel Pociot ? (@marcelpociot) June 12, 2019
If you feel like this could be useful for you as well, here's the little trait for that:https://t.co/IXFpAsxE35 pic.twitter.com/fCccKmLdQs
Read more [twitter.com]
Matthias Noback wrote down some thoughts on the Laravel container
Laravel's service container looks great. I like the idea that it can figure things out mostly by itself. I like that it's PHP-based, and that its syntax is quite compact. I think that most of the convenience functions (e.g. resolve()) and exotic options (like $this->app->resolving()) should be ignored. The best thing you can do for your application in the long term is to let all your services use dependency injection, and to inject only constructor arguments. This keeps things simple, but also portable to other frameworks with other dependency injection containers, or other architectural styles, when the time is there.
Read more [matthiasnoback.nl]
Taylor Otwell gave a Q&A session at the Laravel Live UK conference. You can watch most of the session in the video below. At the end Taylor showed the audience something special. It's not included in the video at his request, you had to be there.
LIVE on #Periscope https://t.co/OasiVowbV8
— Freek Van der Herten ? (@freekmurze) June 10, 2019
I wrote 5 lines of bash code to quickly run #Laravel's scheduler, without having to set up CRON jobs on your dev machine ⏳ Copy-paste the snippet here: https://t.co/PQzn6vd3SF pic.twitter.com/HzOLSqMGvc
— Alex (@AlexVanderbist) June 10, 2019
Read more [twitter.com]
It's funny that even something as simple as a blog app is never finished. One and a half years ago, I did a significant update my moving my blog from WordPress to a Laravel app. In August of last year, I also ditched my custom admin section in favor of Nova. Even though not that much time has passed, it was time for a refresh of the entire blog.