Laravel BackPack's central package, which includes:
- admin login interface, using AdminLTE;
- basic menu;
- pretty error pages;
- alerts system (notification bubbles);
Please subscribe to the Backpack Newsletter so you can find out about any security updates, breaking changes or major features. We send an email every 1-2 months.
- Run in your terminal:
$ composer require backpack/base
- Add the service providers in config/app.php:
Backpack\Base\BaseServiceProvider::class,
- Then run a few commands in the terminal:
$ php artisan vendor:publish --provider="Backpack\Base\BaseServiceProvider" #publishes configs, langs, views and AdminLTE files
$ php artisan vendor:publish --provider="Prologue\Alerts\AlertsServiceProvider" # publish config for notifications - prologue/alerts
$ php artisan migrate #generates users table (using Laravel's default migrations)
- Make sure the reset password emails have the correct reset link by adding these to your
User
model:
- before class name
use Backpack\Base\app\Notifications\ResetPasswordNotification as ResetPasswordNotification;
- as a method inside the User class:
/**
* Send the password reset notification.
*
* @param string $token
* @return void
*/
public function sendPasswordResetNotification($token)
{
$this->notify(new ResetPasswordNotification($token));
}
- [optional] Change values in config/backpack/base.php to make the admin panel your own. Change menu color, project name, developer name etc.
- Run in your terminal:
$ composer require backpack/base 0.6.x
- Add the service providers in config/app.php:
Backpack\Base\BaseServiceProvider::class,
- Then run a few commands in the terminal:
$ php artisan vendor:publish --provider="Backpack\Base\BaseServiceProvider" #publishes configs, langs, views and AdminLTE files
$ php artisan vendor:publish --provider="Prologue\Alerts\AlertsServiceProvider" # publish config for notifications - prologue/alerts
$ php artisan migrate #generates users table (using Laravel's default migrations)
- If you want to be able to use the Reset Password functionality, you need to specify to Laravel to use the Backpack email for this. At the end of your \config\auth.php file, change:
'passwords' => [
'users' => [
'provider' => 'users',
'email' => 'backpack::auth.emails.password', // <--- change is here
'table' => 'password_resets',
'expire' => 60,
],
],
- [optional] Change values in config/backpack/base.php to make the admin panel your own. Change menu color, project name, developer name etc.
- Register a new user at yourappname/admin/register
- Your admin panel will be available at yourappname/admin or yourappname/login
- [optional] If you're building an admin panel, you should close the registration. In config/backpack/base.php look for "registration_open" and change it to false.
If you need to modify how this works in a project:
- create a
routes/backpack/base.php
file; the package will see that, and load your routes file, instead of the one in the package; - create controllers/models that extend the ones in the package, and use those in your new routes file;
- modify anything you'd like in the new controllers/models;
Please see CHANGELOG for more information what has changed recently.
// TODO - instruct developer on how to modify/extend the AuthController and PasswordController and/or provide example
// TODO
$ composer test
Please see CONTRIBUTING and CONDUCT for details.
If you discover any security related issues, please email hello@tabacitu.ro instead of using the issue tracker.
Please subscribe to the Backpack Newsletter so you can find out about any security updates, breaking changes or major features. We send an email every 1-2 months.
Backpack is free for non-commercial use and 39 EUR/project for commercial use. Please see License File and backpackforlaravel.com for more information.