laravel - Installing Sentry2 with Laravel4 -
i trying install sentry2 laravel4 , i've managed far include within project dependency in terms of database bit lost. on website say:
note: database schema located under vendor/cartalyst/sentry/schema/mysql.sql and when go there see sql file various different tables, unsure, need write migration each 1 of these tables or there way can run in order create required tables?
i'm new laravel apologies question if simplistic. seems impractical have write migration each table when of sql contained in file?
any appreciated!
first, make sure have database / environments configured before running migrations. may obvious some, it's worth checking. means making sure have connection details , credentials right inside database.php file, , located in folder (or root) apply environment in run migrations in.
second, since sentry has own migrations, don't have write own. need run migrations come it. luckily, laravel has easy way that. run command on project's root folder:
php artisan migrate --package="cartalyst/sentry" all required tables created automatically. there, can write seed , start testing...
alternatively, can copy included migrations projects own migrations folder. way can migrate , down without having worry comes package , doesn't. so, run migrate:publish command.
php artisan migrate:publish cartalyst/sentry this native functionality of framework, can run both commands above package includes migrations.
finally, run migrations:
php artisan migrate // php artisan migrate:rollback // down
Comments
Post a Comment