Latest Laravel/PHP Articles

Latest Laravel/PHP Articles curated daily from around the web.


Below is a helper function you can use to take an array and group by a key. const groupBy = function (data, key) { return data.reduce(function (carry, el) { var...
Recently I had to create a model factory for my tests but I didn't want it to fire the standard Laravel model events. Model events are fired whenever a record i...
Out of the box Laravel always you to have read/write database connections. This will allow you have different database connections for SELECT queries and INSERT...
CodeMentor Codementor is an online marketplace connecting developers with experts for on- demand 1:1 help via screen sharing, video, and text chat.
Here is a quick command you can use to clean up the node_modules on your computer. This will find and remove all folders on your computer named node_modules. Al...
If you're like me you always need to lookup the difference between local storage, session storage and cookies. Stores data with no expiry date Cleared only via...
Laravel has a lot of helper artisan commands, one of them allows you to clear the cache. php artisan cache:clear This command has an optional parameter allowing...
This is a small command line helper to quickly lookup the options and helpers available to different commands. function lookup() { curl cht.sh/$1 } Now...
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Blade is a PHP templating framework to use with your Laravel application. The blade templates are compiled down to normal PHP code. We can also extend blade by...
When browsers load assets such as CSS and JS they will locally cache them so that they can served quicker the next time users visit the website. A way around th...
Testing is an important area of any application, when you write some code you need to make sure that all your logic is working correctly. In this tutorial we're...
In this tutorial we're going to learn how to setup and use scheduled tasks with Laravel to perform the same tasks on a regular timescale. To use scheduled tasks...
Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
In this tutorial we're going to learn how to use and create your own Laravel facades. https://paulund.co.uk/how-to-create-a-facade-in-laravel#what-is-a-facadeA...
In this tutorial we're going to learn how we can setup Docker containers for development with a Laravel application. https://paulund.co.uk/laravel-development-w...
In a recent project I had to add a constraint to a relationship to make sure it only loads one of a relationship data. In the documentation it shows how you wil...
In this tutorial we're going to learn how we can use our.env variables inside the webpack.js config. This is perfect for the example of when you have a differen...