Install Josh
We try to minimise use of third party packages but sentry is one package which provides many features out of box so we use it.
Setup sentry
Add Sentry to composer
Open your composer.json file and add the following to the require array:
"cartalyst/sentry": "2.1.*",
now in your command prompt run composer update and all required files will be added
Add sentry service provider
Now, we need to add sentry service provider to make use of it.
Open app/config/app.php and add following lines
In the $providers array add the following service provider
'Cartalyst\Sentry\SentryServiceProvider',
In the $aliases array add the following facade
'Sentry' => 'Cartalyst\Sentry\Facades\Laravel\Sentry',
Now we need to add user, groups etc tables to database, to do so in your command prompt, execute following code
php artisan migrate --package=cartalyst/sentryNow we need to publish config, so that you can edit configuration, if needed
Excecute following command in command prompt/terminal
php artisan config:publish cartalyst/sentryplease headover to sentry website to learn more about it
Add admin user
As database tables have been setup, we need to add admin user to be able to login into adminCP.
Run following command in your command prompt
php artisan db:seedA default admin user with user with username admin@admin.com and password admin will be created
Optional: If you wish to use a different username or password, please open app\database\seeds\AdminSeeder.php and edit values around lines 14-18
Adding extra fields to users table
We have added many other fields to users table, you can add all those fields by executing below command in command prompt/terminal
php artisan migrate
Note: please check all files in app/database/migrations to know what fields are being added.
Last updated
Was this helpful?