Laravel 4 Articles

Read the latest articles in the 'Laravel 4' category.

Laravel Laravel 4 PHP

Creating a Twitter Feed in Laravel 4

This tutorial is now out of date - checkout philo/laravel-twitter or thujohn/twitter for an easier and more up to date solution.

In this tutorial I aim to show three things

  • How to get Twitteroath working with Laravel 4
  • How to create and access a new configuration file for your twitter settings
  • How to create a helper method for your tweets

To start off install twitteroath via composer.

Put line 4 in your composer.json with the rest of the Laravel Composer set up and run composer update or composer install if you haven't already

{
	"require": {
		"laravel/framework": "4.0.*@dev",
		"abraham/twitteroauth": "dev-add-composer-json"
	},
	"autoload": {
		"classmap": [
			"app/commands",
			"app/controllers",
			"app/models",
			"app/database/migrations",
			"app/database/seeds",
			"app/tests/TestCase.php"
		]
	},
	"scripts": {
		"post-update-cmd": "php artisan optimize"
	},
	"minimum-stability": "dev"
}