Author name: Alan Bruce

Resize an image in PHP

How to Resize an Image in PHP

When building a website in Laravel (or any other PHP-based framework) where users will be uploading images, you will probably use a library to manipulate and process those images. With cell phone cameras capturing larger, higher-resolution images, raw images that are uploaded could quickly fill the available hard drive space and cause performance issues on …

How to Resize an Image in PHP Read More »

scheduled tasks in laravel

Scheduled Tasks in Laravel

Scheduled tasks in Laravel are helpful when you need to run a task on a given schedule. You might need to export to an Excel file every night, or you might need to send a reminder to a user at a certain time. You could create a Cron job or scheduled task for each of …

Scheduled Tasks in Laravel Read More »

Job Batches in Laravel

When is it helpful to utilize job batches in Laravel? We’ve touched on queues in a previous article. Queues are a useful tool in Laravel, allowing you to run complicated or time consuming tasks in the background. There will be times when you need to run dozens, or even hundreds of instances of a job …

Job Batches in Laravel Read More »

Observers in Laravel

During development on a web project, you may need something to occur when a database table is modified. For example, you might want to send a confirmation notification to a user whenever a record is created. Or you might want to create a record in a log table whenever a record is updated or deleted. …

Observers in Laravel Read More »

policies-laravel

How to Use Policies in Laravel

Laravel policies can streamline the creation of website security measures. Security is an important aspect of most websites, especially those that contain sensitive information. This starts with securing the majority of the content behind a login page. We can also add in 2-factor Authentication, Recaptchas, and other features to make the login more secure. However, …

How to Use Policies in Laravel Read More »