Validating data using closures in Laravel
???? Forgot about this little validation trick that had snuck by undocumented. pic.twitter.com/Hb5QUJY3ix
— Taylor Otwell ????♂️ (@taylorotwell) February 11, 2018
Read more [twitter.com]
???? Forgot about this little validation trick that had snuck by undocumented. pic.twitter.com/Hb5QUJY3ix
— Taylor Otwell ????♂️ (@taylorotwell) February 11, 2018
Read more [twitter.com]
Dries Vints, maintainer of Laravel.io, posted a step-by-step guide on how to get started with Laravel Horizon on a Forge provisioned server.
I recently installed Horizon for Laravel.io and while it wasn’t that hard to install, I still had to figure some things out. Since this was the first time setting everything up I thought I’d write up the steps to take to get started with Horizon and set everything up with Forge and Envoyer.
https://medium.com/@driesvints/laravel-horizon-with-forge-and-envoyer-82a7e819d69f
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.
"If you are one of the *millions* who have downloaded a Spatie package, then you understand the quality that Freek aims for. The newsletter is of the same quality of any Spatie package you're using."
Imagine you want to have an Eloquent model hold a status. It's easily solved by just adding a status field to that model and be done with it. But in case you need a history of status changes or need to store some extra info on why a status changed, only adding a single field won't cut it. To handle…
Laravel has a very powerful notification system. From the docs:
Laravel 5.6 will probably ship this wednesday. One of the cool new features is the ability to register Blade component aliases, which was PRed by my colleague Seb. On his blog Seb guides you through the new functionality.
Laravel 5.6 adds the ability to register alias directives for Blade components. Let's review some background information and examples.
https://sebastiandedeyne.com/posts/2018/blade-component-aliases-in-laravel-56
At Spatie, we have created a dashboard powered by Laravel, Pusher and Vue that displays a lot of information useful for our company. We opensourced the dashboard a while ago.
In a new post on his company blog Chris Sherry explains how they customized our dashboard.
We use Laravel because its a well-known framework among backend developers, meaning there’s a bigger community (including lots of open source libraries), great documentation and a tonne of experience of using the framework.
Vue.js is our first choice because it lets our frontend developers build components for a project without being to be locked into building the whole project on the framework, meaning we can use the right tools for the right job.
The fact that the Spatie dashboard used these meant that all the developers at CUBE would be able to build their own components for it, which was one of my key objectives.
https://3sidedcube.com/blog/2018/02/building-dashboard-laravel-vuejs/
It's really great to see that people customize and use our stuff!
Together with Dries Vints and Frederick Vanbrabant I organise our local usergroup PHP Antwerp. We recently bought some A/V equipment to record all the awesome talks given at our meetup. Here's the first one: a fine talk by Bobby Bouwmann about some cool design patterns used in Laravel.
Laravel 5.5.29 introduced the ability to group a collection on multiple levels. In a new post on his blog, Christopher Rumpel demonstrates the new feature with some good examples.
https://christoph-rumpel.com/2018/01/groupby-multiple-levels-in-laravel
The Vancouver PHP user group recently had a Q&A session with Laravel's creator Taylor Otwell.
Cool Nova tidbit revealed in the video: it'll be a package.
At Spatie we have a dashboard against the wall that displays a lot of information useful for our company. One of the things it shows are the urls of client sites that are down. Behind the scenes it leverages the webhooks from Oh Dear!, a website monitoring service that Mattias Geniar and I launched…
Cristopher Rumpel recently launched a big redesign of his blog. In a new post he touches on why he moved away from his old solution, and what kind of problems he had to solved. Great read!
One of my resolutions for 2017 was to redesign my blog. One week before the new year I faced myself with the challenge and thought to myself if this was still doable. Somehow I managed it and here it is. In this article I will explain the process and show you how I redesigned the blog with Tailwind CSS and moved it from Jekyll to Laravel with keeping almost the same performance.
https://christoph-rumpel.com/2018/01/how-i-redesigned-my-blog-and-moved-it-from-jekyll-to-laravel
On his blog, Sebastian De Deyne, shares a quick tip on how to pass data to a layout in Laravel.
Laravel quick tip! The @extends Blade directive accepts a second (undocumented) parameter to pass data to the parent layout.
https://sebastiandedeyne.com/posts/2018/passing-data-to-layouts-in-blade-through-extends
I'm currently building a webapp named Oh Dear: an easy to use and beautiful website monitor. It has recently gone into it's beta phase. At the moment of writing everybody can register a new account. After you've registered you'll start your trial period of 10 days. Oh Dear is built on top Laravel…
Quick @laravelphp tip:
— Marcel Pociot (@marcelpociot) January 6, 2018
Use the "wasRecentlyCreated" model attribute to check if your model was created or found ???? pic.twitter.com/HZwdDyqAw4
Read more [twitter.com]
Recently we released laravel-cors. This package can add the necessary CORS headers of your Laravel app. In this post I'd like to give a quick explanation of what CORS is and how you can use the package. What is CORS Imagine that all JavaScript code for domain X running in a browser would be able to…
Marcel Pociot, creator of the BotMan framework, explains how you can leverage Alexa, BotMan and Laravel Forge to deploy sites with your voice.
http://marcelpociot.de/blog/deploy-your-laravel-forge-sites-with-your-voice
This post was first published on 24daysindecember.net Chances are that you've never heard of my company Spatie. We specialise in creating Laravel applications for our clients. Our team is rather small: we consist of only 6 developers and one manager. On first glance we are just a web agency like…
In a post on vuejsdevelopers.com Anthony Gore explains how to get started with serverside rending with Laravel and Vue. Cool stuff!
Server-side rendering is great way to increase the perception of loading speed in your full-stack app. Users get a complete page with visible content when they load your site, as opposed to an empty page that doesn’t get populated until JavaScript runs.
One of the downsides of using Laravel as a backend for Vue.js was the inability to server render your code. Was. The release of Vue.js 2.5.0 has brought server-side rendering support to non-Node.js environments including PHP, Python, Ruby etc.
In this tutorial, I’ll take you through the set up steps for Laravel and demonstrate a simple server-rendered app. Get the code for this here on Github.
https://vuejsdevelopers.com/2017/11/06/vue-js-laravel-server-side-rendering/
???? Sometimes you want quick on-the-fly authorization, without the hassle of registering a policy/callback at the Gate.
— Joseph Silber (@joseph_silber) December 28, 2017
Laravel's HandlesAuthorization trait is perfect for this. Simply call the `deny()` method, and Laravel will respond with a 403 HTTP response ???? pic.twitter.com/O36agH2o3u
Read more [twitter.com]
Laravel has an excellent Collection class that has many useful operations. The class is also macroable. This means that you can add function to it at runtime by calling macro on it and passing a name and a closure. In our projects we tend to code up the same macro's over and over again. That's why…