PHPNews

Cascading SoftDeletes with Laravel 5

Laravels Soft Deleting allows you to retain deleted records in your database so they can be used or restored at a later point. Restoring deleted records is great if a mistake is made and you need to revert and retaining deleted data can often be useful in the event you need to pull up some old records. TL:DR: …

Continue reading »

Written by asked.io - - Aggregated on Friday April 29, 2016


Laravel Validaton: All Your Base Are Belong To Us

We all use Laravels Validation feature to ensure we have the required input and it matches some sort of rule . The available rules cover plenty of situations but they fail to cover one of the most important rules, input Sanitization. TL;DR A typical validator Laravels Auth system comes with a simple User …

Continue reading »

Written by asked.io - - Aggregated on Tuesday April 26, 2016


Laravel 5 Artisan and Composer Autocomplete

I was tweetering and came across... Ding! The bulb lights up and I say - let's get this for artisan - life will be easier. Less things to remember, faster access to the commands, why not? Searching for Artisan Autocomplete I found Eric Barnes had already written an article on using Oh My Zsh to …

Continue reading »

Written by asked.io - - Aggregated on Thursday April 7, 2016


Using Bootstrap 3 Less or SCSS with Elixir

I recently wrote an article about How-to setup Laravel 5, VueJs, and Bootstrap 3 and was asked: My how-to didn't cover anything about that so here I will discuss how-to enable and modify Bootstrap 3 variables with Laravel 5 and Elixir. Step 1: Create a project In your terminal: composer create-pro…

Continue reading »

Written by asked.io - - Aggregated on Sunday March 27, 2016


Laravel 5: Social Authentication with Socialite

The next step in todays project is to integrate Social Authentication. I don't need any user details, rather not deal with lost passwords, forms and the likes so Social Authenticaton is the best bet for me, it's fast and easy. Using Laravels Socialite I went over to the github page for socialite and copied …

Continue reading »

Written by asked.io - - Aggregated on Monday March 21, 2016


Quick Start Guide: Laravel 5, vue.js & Bootstrap 3

Vue.js has been getting a lot of attention lately so I've decided to give it another look in a new application I'm building. Vue.js is fast, small and easy to use, so why not give it a shot! Since I'm a Laravel kinda guy I needed to configure vue with L5 and I always use Bootstrap, so that was needed as well. …

Continue reading »

Written by asked.io - - Aggregated on Monday March 21, 2016


Using Google Calendar as a Bill Reminder App

I've been using Google Calendar for years and some of the importat bills I want to be reminded about have their own monthly event. I get anice little notification before the bill is due ( a few days) and the day of. I just have one or two so managing so few reminders is quite easy - but these days I want to keep track …

Continue reading »

Written by asked.io - - Aggregated on Thursday March 3, 2016


Generate SSL urls with Laravel url()

I often find my self using Cloudflares SSL offerings without ever installing a local certificate. So today when I was setting up a new site I was wondering why Laravels url() function wouldn't return a https url. Local Cerfiticates! Install a local cert, switch your Cloudflare SSL mode to Full and then Laravel …

Continue reading »

Written by asked.io - - Aggregated on Thursday March 3, 2016


Host Laravel in a Sub Directory with NGINX

Today I was busy setting up CRUDdy.io , a new site I'll be working on with a SEO friend. I'll be hosting a lot of my Laravel based applications on this site and having to please my SEO pal I needed to use sub folders not sub domains. So I googled "nginx laravel in a subfolder". I found a lot of …

Continue reading »

Written by asked.io - - Aggregated on Thursday March 3, 2016


How-to Block Referral Spam with Laravel 5

Gotta love new sites! Instant referral spam as soon as it comes online. If your new domain is anything like mine (and this happens to ALL my new domains) you're seeing plenty of visitors. But are they real visitors? Google Analytics Says.. NO Just take a look at your Referral Traffic Sources, since …

Continue reading »

Written by asked.io - - Aggregated on Saturday January 23, 2016


Why designers should use Revision Control like Git

Revision control is not just for coders, it never has been , but this is a misconception that a lot of designers people have. Revision Control is for EVERYONE! Coders, designers, asset managers, copywriters, your boss and anyone else on your team who does anything related to FILES . FILES, FILES, FILES …

Continue reading »

Written by asked.io - - Aggregated on Friday January 22, 2016


Google Analytics, Google Maps & 100 Page Speed

UPDATE: Google Maps seems to error out after some time, I will be testing new settings to see if it can still be bypassed. Analytics does not mind this at all. That magical 100 page speed score can be yours if you're willing to spend the extra effort, and hours, to get it. Google Analytics has always been a …

Continue reading »

Written by asked.io - - Aggregated on Sunday January 17, 2016


Laravel 5.2 Creating a New User

I recently started a Analytics program in Laravel 5.2 and was very pleased to find the auth system back in play and extreamly easy to use. It didn't seem to come with any database seeders or commands to add users but seeding is nothing magical and the docs even had a great example. Creating a user in Laravel 5 …

Continue reading »

Written by asked.io - - Aggregated on Friday January 15, 2016


Laravel 5 Minify Middleware

I just started to finish up a new project and one of the last steps is final optimizations. Google Page Speed module wants minified HTML, sometimes it's really strict, some times not so (really it's been random for the past 2 months). On our wordpress site I used the Google Page Speed Module Plugin for NGINX but …

Continue reading »

Written by asked.io - - Aggregated on Thursday January 14, 2016


How to generate XML file dynamically using PHP

Yea, XML? Really.. who knew - it's now 2016 and this format lives on. So like my last post, a revamping this crappy site and OFC the API the company still uses is XML based, so I must be as well. Remember writing xml by hand? I don't, cause that'd be stupid. But many do, and it's still done today. $xml = …

Continue reading »

Written by asked.io - - Aggregated on Saturday January 9, 2016


The magic of PHP short hand.

So it's been a while since I've posted. Not due to lack of ideas but lack of time. TL;DR return $tl ? 'dr' : 'read'; Having a little laugh at old code I've been revamping a site from 2009 or so and it's been a blast laughing at all the awful code. One thing that's always strikes me as off is long handed …

Continue reading »

Written by asked.io - - Aggregated on Saturday January 9, 2016


jQuery Check All Checkboxes in a List

Pretty simple but if you google around you get some pretty poor results, and no article specific to it - not certain why the results are so poor since this has got to be a pretty common search. So a simple script and blog post will hopefully help some people. TL;DR View the snippet. Using jQuery to …

Continue reading »

Written by asked.io - - Aggregated on Saturday October 10, 2015