background preloader

Laravel

Facebook Twitter

@kamran · Ramblings of a full-stack web developer. Awesome-laravel. A curated list of awesome bookmarks, packages, tutorials, videos and other cool resources from the Laravel ecosystem.

awesome-laravel

Multiple DB Connections in Laravel. A while ago, I answered on this SO question about using 2 database connections.

Multiple DB Connections in Laravel

In answering that, I did some investigation which I'll write up here. Here is how to run more than one database connection. This article is about using databases with different data, not necessary for load balancing (or connection pooling) between databases. Define Connections Inside of your datbase configuration file - likely app/config/database.php - you can define more than one database connection of any type.

<? The Whens and Whys for PHP Design Patterns.

State machine

Architecture. Queue. Laracasts Catalog. Pythonhackers. Awesome Laravel A curated list of awesome bookmarks, packages, tutorials, videos and other cool resources from the Laravel ecosystem.

pythonhackers

New Features in Laravel 5.1 - Matt Stauffer on Laravel, PHP, Frontend development. Install Josh. Packages used Delete existing migration files 2014_10_12_000000_create_users_table.php 2014_10_12_100000_create_password_resets_table.php Install Packages "cartalyst/sentinel": "2.0.

Install Josh

*", "laravelcollective/html": "5.1. *", "cviebrock/eloquent-sluggable": "dev-master", "cviebrock/eloquent-taggable": "dev-master", "yajra/laravel-datatables-oracle": "~5.0" Cartalyst\Sentinel\Laravel\SentinelServiceProvider::class, Collective\Html\HtmlServiceProvider::class, Cviebrock\EloquentSluggable\SluggableServiceProvider::class, Cviebrock\EloquentTaggable\ServiceProvider::class, yajra\Datatables\DatatablesServiceProvider::class. Links. How to Setup Laravel 5 in Shared Hosting. Once again, I had to make my hand dirty.

How to Setup Laravel 5 in Shared Hosting

This time I had to deploy Laravel 5 application in a shared hosting. Laravel framework’s architecture is not designed to deploy in shared hosting. So, if you want to deploy in shared hosting of cource you will have to hack the framework. I will not recommend anyone to do this hacking unless you don’t have any other options. Because there are couple of cheap solutions in the market. First, you will have to copy all files from laravel/public to root folder (for shared hosting it is public_html). At line 35 Second, you will have to update server.php file. Expecting, this one helps you out to deploy your Laravel 5 applicaiton in dirty way. Php - How to make a REST API first web application in Laravel.

Oop - Managing relationships in Laravel, adhering to the repository pattern. Production-Ready Beanstalkd with Laravel 4 Queues. Note: TL;DR version at the bottom!

Production-Ready Beanstalkd with Laravel 4 Queues

Queues are a great way to take some task out of the user-flow and put them in the background. Allowing a user to skip waiting for these tasks makes our applications appear faster, and gives us another opportunity to segment our application and business logic out further. For example, sending emails, deleting accounts and processing images are all potentially long-running or memory-intensive tasks; They make great candidates for work which we can off-load to a queue. Laravel can accomplish this with its Queue package. Specifically, I use the Beanstalkd work queue with Laravel. Here's how I set that up to be just about production-ready. Note: I use Ubuntu for development and often in production. Here's what we'll cover: Laravel and QueuesInstalling BeanstalkdChurning through the queue with Supervisor Laravel and Queues Laravel makes using queues very easy.

Here's how that looks in Laravel. Install dependencies $ composer require pda/pheanstalk:dev-master <? Notes. Event Cron Bundle - Laravel Bundles. Php - Laravel-4 cron jobs. Event Cron Bundle - Laravel Bundles. Creating an app to post tweets with Laravel and the Twitter API. In this tutorial we will build a fun little tool for internal/personal usage that posts random tweets at pre-defined times with Laravel and the Twitter API.

Creating an app to post tweets with Laravel and the Twitter API

We will use some of Laravel 4′s powerful features such as Artisan commands, Eloquent ORM and some external packages to make creating an application to post tweets with Laravel 4 quick and easy! Our application will: Allow us to insert a tweet into the databaseAllow us to insert tags into the databaseLink tags to a tweetHave a command that grabs a random tweet and appends tags in a random order To post random tweets with Laravel we will need the following: Our Twitter API keysThe thujohn/twitter-l4 package. Setting up the project First things first, you will need to create an application in your Twitter developer console here. Composer.json Next, run composer update to install these packages. App/config/app.php Now in order to be able to use the Twitter API we must fill out the config file of the Twitter API wrapper.

App/models/Tweet.php. Php - A Cron Job in Laravel 4.

Roles and Permissions

Repository Pattern. Admin. Packages.