A Laravel and PHP Blog

Simpler filesize calculations

PHP & MySQL Tutorials

When working with file sizes in PHP you work with bytes, which often is not what you want. In most c...

David Carr


PHP search string

PHP & MySQL Tutorials

Here's a quick way to search for a word inside a string

David Carr


Solving: Guzzle errors truncated

Development

I'm a big fan of Guzzle it's great for making API calls. But when there is an error returned...

David Carr


Need place holder images for a new design? Placeholder is perfect for the job

Tools Development Design

When prototyping a new layout its convenient to use placeholder images then it i...

David Carr


Laravel Module routes list

Laravel Framework PHP & MySQL Tutorials

I build all my projects with modules. There are times it would be useful to see all routes but...

David Carr


Mask a .php page with Mod Rewrite

Htaccess Tutorials

Let's say you have a static website with various PHP files. These form the URL such as domains.c...

David Carr


Formatting dates to use timezone

PHP & MySQL Tutorials

Working with dates can get complicated when you need a time to change depending on the time of year...

David Carr


Laravel download base64 encoded files

Laravel Framework PHP & MySQL Tutorials

Laravel has the ability to stream files from disc and remove them as soon as they've been downlo...

David Carr


strtotime Add Two Working Days

PHP & MySQL Tutorials

There are times you want to add days to a date but only working days, so weekends are ignored.

David Carr


Crontab command to delete itself

Tutorials Development

I was asked today can you run a cronjob only once. My initial answer was no you cannot as the least...

David Carr


Laravel download files from a route

Laravel Framework PHP & MySQL Tutorials

Laravel makes downloading a server file very easy, in this post I'm going to show a way to downl...

David Carr


Creating a blog from scratch with PHP - Part 9 Cover Image

Demos Blog PHP & MySQL Tutorials

In this part, we will add a cover photo to the blog posts.

David Carr


Dealing with posting large number of checkboxes

Javascript HTML Tutorials

When you have a form with lots of checkboxes, you may hit a limit to how many you can post. I had th...

David Carr


Export to CSV

Development

Today I've released a new PHP package for exporting array data to a CSV file. Often data ne...

David Carr


Announcing DC Casts

Development

In the new year DC Casts will be launched, a video site for teaching web development.

David Carr


Help support the blog so that I can continue creating new content!

Subscribe to my newsletter

Subscribe and get my books and product announcements.

© 2009 - 2022 DC Blog. All code MIT license. All rights reserved.