How to use custom pivot tables in Laravel 6.x

November 18, 2019

Have you run into this before? Your app’s database table structure is predefined and unalterable. There are lookup tables (called pivot table in Laravel) that create many to many relationships between tables using YOUR naming convention. It makes sense in the context of your application, but you quickly find out that Laravel’s relationship defaults do

Cookies disappear after adding Set-Cookies in .htaccess? Here is how to get them back

November 27, 2018

I needed to set a cookie via .htaccess, to ensure it was always in the browser, regardless of what the website was doing. Setting a cookie is rather easy, it will look similar to: Header set Set-Cookie “cookieName=value; Expires=Wed, 15 May 2222 07:28:00 GMT” The next morning I attempted to login to the site and

Using wget to crawl your website

April 2, 2018

If you are looking to crawl your website for something like cache warming you can do so with wget quite easily. The following wget command will crawl a site and leave nothing behind on the local filesystem afterward. wget –mirror -q -e robots=off -p -r –delete-after -nd http://www.isleofmtv.com –mirror crawls the entire site -q prevents