Friday, September 23, 2016

5 Key Ways to Improve Engagement Metrics for Your Content

Every time someone types in a search query on Google, they’re given a list of results. The way in which those results are ordered is a highly complex algorithmic process that takes into account over 200 factors, and those factors are constantly changing. One thing that Google hasn’t changed, however, since they first started in […]

Continue reading %5 Key Ways to Improve Engagement Metrics for Your Content%


by Richard Hammond via SitePoint

Mail Logging in Laravel 5.3: Extending the Mail Driver

Laravel Logo

One of the many goodies Laravel offers is mailing. You can easily configure and send emails through multiple popular services, and it even includes a logging helper for development.

Mail::send('emails.welcome', ['user' => $user], function ($m) use ($user) {
    $m->to($user->email, $user->name)->subject('Welcome to the website');
});

This will send an email to a new registered user on the website using the emails.welcome view. It got even simpler with Laravel 5.3 using mailables (but the old syntax is still valid). Here's an example:

# Generate a new mailable class
php artisan make:mail WelcomeMail

// app/Mail/WelcomeMail.php

class WelcomeUser extends Mailable
{

    use Queueable, SerializesModels;

    public $user;

    public function __construct(User $user)
    {
        $this->user = $user;
    }

    public function build()
    {
        return $this->view('emails.welcome');
    }
}

// routes/web.php

Route::get('/', function () {
    $user = User::find(2);

    \Mail::to($user->email)->send(new WelcomeUser($user));

    return "done";
});

Laravel also provides a good starting point for sending mails during the development phase using the log driver, and in production using smtp, sparkpost, mailgun, etc. This seems fine in most cases, but it can't cover all the available services! In this tutorial, we're going to learn how to extend the existing mail driver system to add our own.

To keep our example simple and straightforward, we're going to log our emails to a DB table.

Continue reading %Mail Logging in Laravel 5.3: Extending the Mail Driver%


by Younes Rafie via SitePoint

Google Play Services: Google Cast v3 and Media

AtoZ CSS Screencast: The ID Selector

ID is a CSS selector that allows the styling of a single unique element.

Their use in CSS is common and often a little controversial.

I personally avoid ID for styling things in CSS, but I’m not going to force my personal preferences on you.

In this video, I will outline some of the reasons why I prefer the class selector over ID, how CSS specificity works and some tips for writing more modular and reusable code.

Syntax

Let’s start with the basics and look at how ID can be used to select an element in CSS.

Given this series of <div>, if I wanted the third one to be a feature box, I could add an id attribute to the HTML as follows. This is a unique identifier, a bit like your passport number or social security number and there can be only one with this value on any given page.

Continue reading %AtoZ CSS Screencast: The ID Selector%


by Guy Routledge via SitePoint

Particles.js: Introduction

Muziq

Muziq - Music Band & Musician WordPress Theme

'Muziq' is a One Page WordPress theme suited for any artists or bands who want a smart long scrolling website. The theme is packed with features including intro slideshow, poster section, band member section, discography, tour date slider, latest Tweets and an image gallery. Pretty awesome of JellyThemes to include demos for 4 difference genres to really give you a feel of the theme! Lastly, the theme includes the powerful Visual Composer page builder plugin (valued at $34) and the Slider Revolution plugin (valued at $19) at no extra cost.

by Rob Hope via One Page Love

Hublot MP-05 LaFerrari Sapphire

Inspired by the FXX K supercar, the MP-05 "LaFerrari" Sapphire is a futuristic, 3D design machined from 7 blocks of sapphire, involving more than 600 hours' work and precise 3D workmanship. This WebGl experience is a premiere for Hublot like its first animated film created by Digital Domain
by via Awwwards - Sites of the day