Laravel Admin Modules for Your Next Laravel App
I came to know Backpack for Laravel 4 years ago after Laravel released version 5. Back then, I created my first CMS/shopping cart using CodeIgniter and moving to Laravel. I was looking for the backend modules and I found the perfect match for my CMS. I used module PageManager for general pages, NewsCrud for blog articles, PermissionManager for user access control, FileManager for file management, etc. It had everything I needed to create my own CMS/Web app backend.
One of the best things is that it is free for a personal project. You can find more details about licensing and conditions here.
I haven’t used PHP for nearly three years and I just started creating my personal web app using Backpack for Laravel.
The installation for each module is simple and well-documented. Then I thought, why not automate the installation process for all the modules. I came up with my solution using a Bash script. I call it backpack_install. This script automates the installation of all 8 Backpack for Laravel modules from your terminal.
I tested it on macOS and it should work on Linux. I’d like to ask someone to test it on Windows 10 using Windows Subsystem for Linux 2 (WSL2).
Awesome package manager
After installing the Awesome package manager:
awesome install shinokada/backpack_install
brew tap shinokada/backpack_install
brew install backpack_install
~/bin directory and add the path to your terminal config.
echo export PATH="$HOME/bin:$PATH" > ~/.bashrc
You can clone or download the repo and move it to the
git clone [email protected]:shinokada/backpack_install.git
mv backpack_install ~/bin
- You must have Laravel installed and connected to a database.
- No data in the database.
composer create-project laravel/laravel myproject
If you are using MAMP you need to use
127.0.0.1 for the host and
8889 for the port.
APP_URL=http://127.0.0.1:8000# .env DB example for MAMP
php artisan serve
Install all modules at once
From your new project directory, run
The script confirms if your database connection.
Install modules one by one
You can install modules one by one. In this way, you can control which modules you want to install. It will ask you for each module.
Installing to another directory
You can run from any directory. You just need to give
backpack_install -d ~/Laravel/myproject
You can uninstall all modules using the
For example, uninstalling a Laravel project in
backpack_install -u -d ~/Laravel/myproject
After running uninstallation using the
-u flag, you are recommended to run git reset and git clean.
$ cd $laravel_dir
$ git reset --hard
$ git clean -f -d
Clean your database.
To use the BackupManager, you need to configure BackupManager optional.
Check the installation by going to http://127.0.0.1:8000/admin. (You may need to change the URL.) Click the Register link and create a new user.
Backpack for Laravel quick tour
You will see a side menu to navigate yourself.
It takes about 80–90 seconds to install all eight modules. I highly recommend Backpack for Laravel for your next PHP project. Getting Started Videos will be your next step to watch. I’m sure the Backpack for the Laravel team will continue to develop new and better solutions. Give it a go with backpack_install and please let me know how it goes.
If you like my article and would like to receive newsletters, please sign up.
Get full access to every story on Medium by becoming a member.