News Feed
Sections




News Archive
feed this:

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

NetTuts.com:
Creating a Dating Application with Sinch RESTful API
April 27, 2015 @ 10:19:26

NetTuts.com has kicked off a new tutorial series today about building a dating application with a combination of Laravel, MongoDB and the Sinch service allowing for messaging between users. The Sinch service has several features including voice/messaging/SMS communication methods and device verification.

In this tutorial, we're going to create a dating application for iOS similar to Tinder. For voice and messaging, we will leverage the Sinch platform, making use of its powerful SDK. In the first part, we will focus on the development of a RESTful API to store and retrieve user information. In the second part, the iOS client will hook into this API to find nearby users based on the user's current location. We will use Laravel 5.0 for the RESTful service and will be covering basic concepts, such as routes and controllers. We are also going to define custom models to support MongoDB integration in an ActiveRecord-like manner.

This first part of the series is mostly about just getting things set up so they walk you through:

  • Basic setup of the Laravel application
  • Creation of the Base model (for MongoDB connection)
  • Creating helper methods
  • Building out CRUD functionality for the database layer
  • Making a User model
  • Creating the BaseController class
  • Making a SessionController class (and working with sessions)
  • Building a UserController

They end this part of the series by hooking all of this functionality together with some simple RESTful routing for GET, POST, PUT and DELETE request handling for the various endpoints.

0 comments voice your opinion now!
tutorial series laravel sinch messaging rest api framework part1

Link: http://code.tutsplus.com/tutorials/creating-a-dating-application-with-sinch-restful-api--cms-23709

Scotch.io:
Build a Time Tracker with Laravel 5 and AngularJS - Part 2
April 22, 2015 @ 09:38:53

Scotch.io has posted the second part of their series today showing you how to build a simple time tracking application with Laravel and AngularJS. In this latest part of the series he finishes the application and connect the two pieces.

This is the second of a two-part series on using Laravel 5 and AngularJS together to build a simple time tracking application. If you've gone through part 1, you'll have seen that we put together the front-end first and used a simple JSON file with some mocked-up data to test with. We left off with the ability to add new time entries and have the total time from all of them display on the side. We didn't include any way to edit or delete the time entries, and of course there was no persistence to a database. In this part we will complete the application so that the time entries get stored in a database and our Angular front-end and Laravel backend work together to create, read, update and delete from it.

He starts by helping you get a Laravel application up and running (time-tracker-2), set up the database and modify the configuration to point to the database location. He helps you run the migrations to set up the database tables and generate the related model code. Next up he shows how to inject the seed data, setting up the main index view and adding in routes for the Angular code to access. The rest of the article is just about as detailed and covers steps to:

  • View all the Available Routes
  • Return all Time Entries
  • Return All Users
  • Updating the front-end
  • Setting up the users list
  • Creating time entries
  • Updating time entries
  • Deleting time entires

Finally he wraps it all up with a few possible things that could be done to improve the application, both simple and a bit more complex. He challenges you the developer to implement those features.

0 comments voice your opinion now!
tutorial angularjs laravel series part2 time tracker application

Link: https://scotch.io/tutorials/build-a-time-tracker-with-laravel-5-and-angularjs-part-2

NetTuts.com:
Building Your Startup With PHP Scheduling a Meeting
April 21, 2015 @ 11:37:52

NetTuts.com continues its "Building Your Startup with PHP" series today in this latest post enhancing the application and allowing the user to add a meeting.

This tutorial is part of the Building Your Startup With PHP series on Tuts+. In this series, I'm guiding you through launching a startup from concept to reality using my Meeting Planner app as a real life example. Every step along the way, we'll release the Meeting Planner code as open source examples you can learn from. We'll also address startup-related business issues as they arise. All of the code for Meeting Planner is written in the Yii2 Framework for PHP.

In this new post (one of four that will deal with adding a meeting) they start by creating the initial meeting listing page that includes a description, last update date and icons linking to actions to perform on that meeting. Next up they create the "Create Meeting" form and the functionality behind the scenes to make it work. This includes some alerting functionality as well. Next is the functionality to invite people to the meetings, using autocomplete handling to make it easier to locate individuals. Following this they include code to add locations (integrating Google Maps), assigning a meeting time and adding additional notes.

0 comments voice your opinion now!
startup tutorial series schedule meeting yii2 framework

Link: http://code.tutsplus.com/tutorials/building-your-startup-with-php-scheduling-a-meeting--cms-23252

NetTuts.com:
How the Directory Structure Has Changed in Laravel 5
April 16, 2015 @ 09:47:47

On the NetTuts.com site today they have a new tutorial (screencast) posted showing what the changes are in the directory structure of Laravel 5.

The newest version of Laravel was released in February, and the most noticeable change in version 5 is the new directory structure. In this short video tutorial, I'll explain exactly what's changed and why.

The video is a part of a larger series and is one of two free videos for it. The remainder of the series covers things like middleware, contracts, events, forms and validation as well as the command bus and its use.

0 comments voice your opinion now!
laravel5 screencast directory structure change tutorial series

Link: http://code.tutsplus.com/articles/how-the-directory-structure-has-changed-in-laravel-5--cms-23795

Phillip Shipley:
Creating a PHP Nexmo API Client using Guzzle Web Service Client - Part 4
April 15, 2015 @ 09:56:21

Phillip Shipley continues his series looking at creating a client for the Nexmo API with his latest post, part four focusing on the testing of the current connections and state of the code.

At this point in this series we have a complete PHP client for the Nexmo APIs. Hopefully I've been able to teach some good practices and designs in the process of developing it, but I know many of you test-driven-development advocates are probably screaming that I've left out the most important part: testing, and testing early. Well, in order to keep these tutorials focused I've saved the testing to the end, and actually when testing API clients I find it easier to write the tests afterwards, but I'll get into that later.

He points out that running tests on code that connects to APIs it a bit tricky as you don't want it to make actual API requests every time you run the tests. Instead he shows how to use Guzzle mock responses and the Mockable.io service (when you do actually need to test that HTTP requests are made). He includes the code examples to create the Guzzle mock response as well as a brief look at how to use Mockable along with your current tests with an "override" on the base URL.

0 comments voice your opinion now!
series tutorial part4 guzzle nexmo api client testing mockresponse mockableio

Link: http://www.phillipshipley.com/2015/04/creating-a-php-nexmo-api-client-using-guzzle-web-service-client-part-4/

NetTuts.com:
Design Patterns The Singleton Pattern
April 14, 2015 @ 12:31:44

On the NetTuts.com site today they've posted another in their series introducing the various design patterns that have been established in software development. In this new post they talk about the Singleton pattern (or "anti-pattern" as it's sometimes called).

In this article you are going to learn how to implement the Singleton design pattern, and why and when to use this pattern in your application. As the name "Singleton" suggests, this method allows us to create one and only one object of a class.

They start with a basic definition of the pattern that, at its heart, is about reusing one and only one instance of an object. To help make it more concrete, they include an example that's refactored to use the Singleton pattern: creating and reusing single instances of database connections (PDO). The article also talks a bit about the idea of the Singleton being an anti-pattern and how it can make things like unit testing difficult.

0 comments voice your opinion now!
designpattern tutorial series singleton introduction

Link: http://code.tutsplus.com/tutorials/design-patterns-the-singleton-pattern--cms-23073

Phillip Shipley:
Creating a PHP Nexmo API Client using Guzzle Web Service Client - Part 3.5
April 13, 2015 @ 11:14:29

Phillip Shipley has continued his series about hooking your PHP application into the Nexmo API with this new update, part 3.5 of the series. It's a smaller follow up to the code and functionality introduced in part three with a quick implementation of some of the other API methods.

As I've hit on several times, using the Guzzle Web Service description way of developing an API client can save a lot of time. It took me a little less than an hour to finish adding support for these three sets of APIs. If I was writing every Guzzle client initialization and call individually it would have taken a lot longer I'm sure.

The process only takes four steps and the majority of that is just setup via Composer. In order to make things easier and so that you don't have to worry about the details of implementing each of the API features, he's just created a repository to bring all of that functionality in at once. He includes the code you'll need to add to use it as well (about the same as before, just with different client types).

0 comments voice your opinion now!
nexmo api tutorial series part3plus guzzle webservice client repository

Link: http://www.phillipshipley.com/2015/04/creating-a-php-nexmo-api-client-using-guzzle-web-service-client-part-3-5/

Phillip Shipley:
Creating a PHP Nexmo API Client using Guzzle Web Service Client - Part 3
April 10, 2015 @ 09:25:40

Phillip Shipley has posted the next part in his series about making a client with Guzzle for the Nexmo API. In this latest post he adds functionality to the client made in previous parts of the series (part1, part two) to allow for message searching.

Now let's go ahead and add another SMS related API to show how easy it is since we already have the base client and description in place. Nexmo also has APIs to search for a specific message, multiple messages based on some criteria, as well as for rejected messages. Let's go ahead and add these three interfaces to our SMS description and see what it takes.

He includes the code to add to the current client and configuration to enable the "SearchMessage" functionality and the correct handling of the result. He shows how to update the client class with a new "searchMessage" method and the searching of the rejections with the Insight API.

0 comments voice your opinion now!
nexmo api tutorial client guzzle series part3 webservice search rejected

Link: http://www.phillipshipley.com/2015/04/creating-a-php-nexmo-api-client-using-guzzle-web-service-client-part-3/

Phillip Shipley:
Creating a PHP Nexmo API Client using Guzzle Web Service Client - Part 2
April 09, 2015 @ 11:58:38

Phillip Shipley has posted the second part of his series (first part is here) about creating a PHP client for the Nexmo API with Guzzle, the popular PHP HTTP client.

In Part 1 of this series we laid a foundation for consuming the Nexmo SMS API and covered a few ways to interact with it. In this part we'll create the actual Guzzle Web Service Client to interact with it to demonstrate how simple it can be.

He starts by getting Guzzle installed via Composer including a few extra components: guzzle-services, retry-subscriber and log-subscriber. He defines the structure (code) for the message to send to the Nexmo service. Next up is the creation of the actual client that takes in configuration settings and extracts the HTTP location and applies the provided credentials to the connection. Finally he makes a simple SMS client that extends this base client and puts it to use with a simple message defined in an array (to, from and text contents). The client then reports back the results in a simple nested array with response information from the Nexmo API.

0 comments voice your opinion now!
nexmo client guzzle webservice api part2 series connect send

Link: http://www.phillipshipley.com/2015/04/creating-a-php-nexmo-api-client-using-guzzle-web-service-client-part-2/

SitePoint PHP Blog:
Using Github Webhooks with PHP
April 08, 2015 @ 10:16:21

The SitePoint PHP blog has a new tutorial posted from Younes Rafie continuing their series about using the GitHub API from PHP. In this second part of the series he shows how to integrate the GitHub Webhooks with your applications.

In the first part of our series, we talked about the Github API and built a demo in the process. In this part we are going to explore the Webhooks API, and we will build a demo to showcase the API usage.

The demo application they set up gets a push request from the GitHub API and save the resulting data to a local database. They use Laravel 5 to build the application but it could easily be in any other framework (or just plain PHP). They're also deploying to Heroku, but again, you can use your own service. The article then shows you how to go and register a webhook in the repository on the GitHub site and create the "hooks" table to store the event name and contents of the request. He makes use of a JSON output route and the ChartsJs library to render a simple bar graph of the contributors to the repository based on the number of commits they've made.

0 comments voice your opinion now!
tutorial series part2 github webhooks api laravel5 chartsjs json

Link: http://www.sitepoint.com/using-github-webhooks-php/


Community Events

Don't see your event here?
Let us know!


series community podcast release performance framework php7 voicesoftheelephpant introduction application opinion library version example extension laravel symfony2 interview conference api

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework