Posts in category: PHP & MySQL

PHP & MySQL | Tutorials

Financial year select menu

Financial years start from April to March, a common requirement is to be able to select a financial...

David Carr


PHP & MySQL | Tutorials

Regular expression to convert usernames into links like Twitter

When using plain textareas it's useful to link usernames in the format as @name but wo...

David Carr


Laravel Framework | PHP & MySQL | Tutorials

Laravel storing mailables

Laravel's Mailable emails are perfect for sending rich HTML emails, there are times when you nee...

David Carr


Laravel Framework | PHP & MySQL | Tutorials

Laravel retrieving records in a random order

Retrieving records in a random order is simple with MySQL using the RAND() function but it's not...

David Carr


Laravel Framework | PHP & MySQL | Tutorials

Laravel show zeros when using zerofill in Eloquent

When using Eloquent leading zeros are removed from integers data types. This is a problem when you w...

David Carr


Laravel Framework | PHP & MySQL | Tutorials

Laravel login as user without their password

There are times you want to log in as another user to test their user permissions, you'll want t...

David Carr


Laravel Framework | PHP & MySQL | Tutorials

Laravel add custom exception handling

Laravel comes with support for many types of exceptions, some are handled to load a 404 page others...

David Carr


Laravel Framework | PHP & MySQL | Tutorials

Laravel add login throttling with custom login controller

When using a custom login controller by default it won't have the login throttling applied.

David Carr


Laravel Framework | PHP & MySQL | Tutorials

Create an XML sitemap

Creating xml sitemaps are great for Google to inform their search bots of all your pages and th...

David Carr


Laravel Framework | PHP & MySQL | Tutorials

Laravel create an RSS reed

In this post, I'll explain how to create an RSS feed, In your controller query a model, in this...

David Carr


Laravel Framework | PHP & MySQL | Tutorials

Laravel get previous and next record

A really common task is to display links for the previous and next record typically you find these o...

David Carr


Laravel Framework | PHP & MySQL | Tutorials

Laravel force https with url helper

using the url() helper is great for creating full http links, I use this for all links, when wo...

David Carr


Laravel Framework | PHP & MySQL | Tutorials

Laravel blade - Remove the last comma from array

Using the $loop variable inside of a loop it’s easy to check when you're at the start or t...

David Carr


Laravel Framework | PHP & MySQL | Tutorials

Laravel 5.5 change public to public_html

When moving Laravel onto a production server I like to place all Laravel files in their own director...

David Carr


Laravel Framework | PHP & MySQL | Tutorials

Laravel 5.5 use a prefix on database tables

I like to prefix my database tables to avoid any conflicts if using different applications within th...

David Carr


Support my work by donating with PayPal.

Subscribe to my newsletter

Subscribe and get my books and product announcements.

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