News Feed
Sections




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

SitePoint PHP Blog:
Build a Database with Eloquent, Faker and Flysystem
August 28, 2014 @ 11:55:09

In the latest post to the SitePoint PHP blog Aleksander Koko continues with his series about creating an application with PHP and EmberJS with a look at building databases. In the first part of the series he introduced the main toolset and set up a simple Laravel application inside of a Homestead instance. This latest post builds on that platform.

In this part, we will create the structure of the database. We will create the tables using migrations and seed the database using seeders. Also, you will learn how to grab some random images from LoremPixel and put them on the filesystem using Flysystem. You'll also be adding some randomly generated data using the Faker library. Much like with part 1, you can download this part's code from github.

He shows you how to get all the needed libraries installed and run the migrate command to create the needed tables. He also helps you set up a Dropbox application so you can use their API and configure the application with your API settings. Next he modifies the migrations and seeds the sample data. Next up he makes the models for each of the tables and integrates Faker to populate them with better seed data, making seeder classes to handle some of the more custom logic.

0 comments voice your opinion now!
database eloquent faker flysystem dropbox seed data tutorial emberjs

Link: http://www.sitepoint.com/build-database-eloquent-faker-flysystem/

blog comments powered by Disqus

Similar Posts

PhPL33t Blog: How to Automated Plesk Email Creation

Content with Style: Fulltext searches with Xapian and PHP

HTMLGoodies.com: PHP Tutorial - Introduction

WebMonkey: Get Your Feet Wet with WordPress

Community News: Symfony Framework Makes Some Updates (v.0.6.2 and Content)


Community Events





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


deployment opinion release framework install series laravel tips list symfony community api podcast interview package update introduction language zendserver library

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