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

HTMLGoodies.com: PHP Tutorial - Introduction

DevShed: Creating the Blog Script for a PHP/MySQL Blogging System (Part 2)

Kevin Schroeder's Blog: New Zend Server Job Queue Library

Rob Allen's Blog: New Zend_Auth tutorial

ParanoidFerret.com: Flex & PHP Tutorial - Transmitting data using JSON


Community Events

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


laravel introduction composer yii2 list framework example podcast php7 application opinion language api symfony interview part2 community project programming series

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