A Laravel and PHP Blog

Laravel retrieving records in a random order

Laravel Framework PHP & MySQL Tutorials

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

David Carr


Laravel show zeros when using zerofill in Eloquent

Laravel Framework PHP & MySQL Tutorials

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

David Carr


Laravel login as user without their password

Laravel Framework PHP & MySQL Tutorials

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

David Carr


Laravel add custom exception handling

Laravel Framework PHP & MySQL Tutorials

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

David Carr


Laravel add login throttling with custom login controller

Laravel Framework PHP & MySQL Tutorials

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

David Carr


Create an XML sitemap

Laravel Framework PHP & MySQL Tutorials

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

David Carr


Laravel create an RSS reed

Laravel Framework PHP & MySQL Tutorials

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

David Carr


Laravel get previous and next record

Laravel Framework PHP & MySQL Tutorials

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

David Carr


Laravel force https with url helper

Laravel Framework PHP & MySQL Tutorials

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

David Carr


Laravel blade - Remove the last comma from array

Laravel Framework PHP & MySQL Tutorials

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

David Carr


jQuery autocomplete on new element

Javascript Tutorials

jQuery’s autocomplete plugin is perfect for filling in forms with suggestions as you type in a...

David Carr


Laravel 5.5 change public to public_html

Laravel Framework PHP & MySQL Tutorials

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

David Carr


Use TPL syntax highlighting in Atom with Nova Framework

Nova Framework Tools

Using Atom editor is great visually the only issue is out the box .tpl is not recognized or is recog...

David Carr


Github deploy to server

Tools Development

This tutorial will show you how to deploy from GitHub to your server using GIT. Deploying with GIT m...

David Carr


GitLab deploy to server

Tools Development

This tutorial will show you how to deploy from GitLab to your server using GIT. Deploying with GIT m...

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.