03.12.2015 Views

laravel4cookbook

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Authentication 10<br />

.<br />

This file should be saved as app/database/seeds/DatabaseSeeder.php.<br />

The DatabaseSeeder class will seed the users table with my account when invoked. If you’ve already<br />

set up your migration and model, and provided valid database connection details, then the following<br />

commands should get everything up and running:<br />

1 composer dump-autoload<br />

2<br />

3 Generating autoload files<br />

4<br />

5 php artisan migrate<br />

6<br />

7 Migrated: ****_**_**_******_create_user_table<br />

8<br />

9 php artisan db:seed<br />

10<br />

11 Seeded: UserSeeder<br />

The first command makes sure all the new classes we’ve created are picked up by the class autoloader.<br />

The second creates the database tables specified for the migration. The third seeds the user data into<br />

the users table.<br />

Configuring Authentication<br />

The configuration options for the authentication components are sparse, but they do allow for some<br />

customisation.<br />

1

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

Saved successfully!

Ooh no, something went wrong!