Bootstrap 3 and Webpack

My time spent learning Laravel recently has forced me to take a look at webpack. Laravel uses webpack as the frontend tool of choice for compiling javascript and css files. Laravel ships with an abstraction on top of the tool called Laravel Mix that takes care of some of the configuration and makes the process a little easier. Having used it a little bit I became curious about implementing webpack in a couple of smaller projects independently.

I decided to start with something simple–jquery and bootstrap, but quickly found that even something that simple was not as simple as it would appear. After some searching and some comparisons I was able to make something work. I’m going to detail what I found, since I wasn’t able to find a lot out there that was complete and simplified.

Continue reading “Bootstrap 3 and Webpack”

Laravel API Authentication Middleware

Laravel 5.6 has a native API authentication middleware as an alternative to Passport (https://laravel.com/docs/5.6/passport). If you are not running an up-to-date version of PHP on your servers however, you are going to have some difficulties using Password (as I learned the hard way). After doing some digging I ran across an article for versions 5.2 and 5.3 (see link below) which I found still applicable.

Continue reading “Laravel API Authentication Middleware”

Logging Email with Laravel

Laravel provides the Mail facadeĀ (as of version 5.6) which acts as a wrapper around the PHP email library Swift Mailer.

Any application that sends emails needs to have logging for send events. No one wants to go wading through Linux sendmail logs or bothering sysadmins to go through Exchange logs.

Swift Mailer provides a couple of different logging plugins natively. Laravel provides decent documentation around their Mail facade but omit some details. One feature they leave out are Swift Mailer’s plugins and how to access them using the wrapper.

Continue reading “Logging Email with Laravel”

Getting Started With SVG

SVG allows for fantastic scalability and the source code behind the images is actually xml and editable.

SVG is a big deal. It seems to me like its becoming a bigger deal, at least, I’m running into it more often. The trend toward responsive design is probably at the root of this push. SVG allows for fantastic scalability and the source code behind the images is actually xml and editable. I ran into Steven Bradley’s blog vanseodesign.com a few weeks ago and have really profited from his tutorials on SVG. If you’re looking for a good starting point I would recommend you start here and follow along. He has a great writing style and his examples are understandable.

WordPress Social Media Tags Without Plugin

WordPress does great as a Content Management System, but leaves a lot to be desired when it comes to getting ready for Social Media. Google, Facebook, and Twitter all have their own markup schemes which really provide some enhancements to content that is shared on those networks. Getting that markup on WordPress is the challenge. There are plugins that help provide this sort of functionality, but I prefer to keep it simple and I also like to know how it is done. So I rolled up my sleeves and put something together to get the job done.

Continue reading “WordPress Social Media Tags Without Plugin”

Mobile Browsers

Recent years have seen an increase in discussions over native apps and mobile apps. But this is not where our energies need to be spent. Our energies need to be spent with better web browsers and web designs that are friendly for mobile devices whether responsive or mobile-first.

There are two glaring deficiencies (at least!) in the mobile sphere: programmers utilizing web browsers and users demanding decent web browsers. I noticed the issue for the first time this week with a release from the Electronic Freedom Foundation for their new mobile app.

Their app is probably really good. I really like the EFF. The app has an alert system for EFF’s new campaigns. You should probably download it. You should probably donate or at least show some support for the EFF and the work they do. But do they need an app?

Let’s be clear the issue is not EFF or their app. The issue is withe the flood of apps that are being published every year for website after website. I’ve never really cared much for the issue of native vs mobile apps. Each has their supporters and frankly each probably has their own place and strengths–but what about the web page?

Continue reading “Mobile Browsers”