Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Laravel News:
How to Create A Most Popular List with Laravel and Google Analytics
Sep 02, 2016 @ 09:40:16

On the Laravel News site there's a new post showing you how to make use of the Google Analytics API in your Laravel application to find trending content in your site (most accessed pages).

Here on Laravel News, I wanted to generate a list of the most popular posts for the past seven days and display the results from most popular to least popular. To solve this problem I thought of two solutions. The first is to build my own tracking system so I could keep a count and then use it for ordering. However, that could generate a huge amount of data and it seemed like a solution that an analytics tracking service could handle.

As I was fumbling through the Google Analytics API I found a Laravel Analytics package by Spatie.be that allows you to easily retrieve data from your Google Analytics account and it seemed like the best way to solve this problem. Let’s look at how I used it to generate a list of popular posts here on Laravel News.

They then walk you through the installation (via Composer) and configuration of the library. This includes linking to more information about setting up the credentials for the connection. They then show how to use it to fetch the most popular pages and what the response looks like as a collection. Finally they show you how to create a wrapper class you can easily reuse anywhere in your application to fetch and display this "trending" information". The post ends showing you how to create a "View Composer" that only fires when the view is being rendered, not on every request.

tagged: laravel googleanalytics trending popular page results tutorial package

Link: https://laravel-news.com/2016/09/most-popular-list-laravel-google-analytics/

Rafael Dohms' Blog:
php|tek 2011 and what's trending
Jun 02, 2011 @ 10:34:45

Rafael Dohms has posted a wrapup of this year's php|tek '11 conference and has included some of his thoughts about the "trending technologies" he saw during his time there.

Another edition of php|tek has come and gone and this year some very amazing topics came into view. The conference itself was once again a great experience, great people, incredible speakers, lots of activities and incredible hack-a-thons and unconference sessions.

Topics he noticed coming to the forefront at this year's event included:

  • Cloud computing (and the PHP-specific offerings related to it)
  • Mobile development
  • API and external tool integration

He also mentions one thing he wouldn't mind seeing more of at events - the "soft skills" sort of presentations. They're less about the technology that's used and more about the "people skills" developers can use to make the best of their careers.

tagged: tek11 trending topics conference api mobile application cloud