03.12.2015 Views

laravel4cookbook

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

E-Commerce 238<br />

We can actually test this process, to see how the data is created, and how we can authenticate against<br />

it. Seed the database, using the following command:<br />

1 php artisan migrate:refresh --seed<br />

Depending on whether you have already migrated the schema; this may fail. If this happens, you<br />

can try the following commands:<br />

1 php artisan migrate<br />

2 php artisan db:seed<br />

.<br />

The refresh migration method actually reverses all migrations and re-migrates them. If you’ve not<br />

migrated before using it - there’s a change that the missing tables will cause problems.<br />

You should see ten account records, each with a different email address and password hash. We can<br />

attempt to authenticate with one of these. To do this; we need to adjust the auth settings:<br />

1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!