Skip to content

Bash script to install all Backpack for Laravel modules from your terminal.

License

Notifications You must be signed in to change notification settings

shinokada/backpack_install

Repository files navigation

Backpack Installer for macOS/Linux

Overview

This script automates to install all Backpack for Laravel modules from your terminal.

Tested on macOS and it should work on Linux.

Installs BackupManager, LogManager, Settings, PageManager, PermissionManager, MenuCrud, and NewsCrud.

Medium Article

Requirement

UNIX-lie (Tested on Ubuntu and MacOS.)

Installation

macOS

brew tap shinokada/backpack_install
brew install backpack_install

Using Awesome Package Manager for Linux

After installing awesome script package manager:

awesome -i shinokada/backpack_install
backpack_install -v

Set up

  1. Install Laravel

    composer create-project laravel/laravel myproject
  2. Update .env file.

    If you are using MAMP:

    ...
    DB_CONNECTION=mysql
    DB_HOST=127.0.0.1
    DB_PORT=8889
    DB_DATABASE=example_app
    DB_USERNAME=root
    DB_PASSWORD=root
    ...
  3. (Optional) Start Laravel

    php artisan serve

Usage

# Install all modules at once
composer create-project laravel/laravel myproject
cd myproject
backpack_install

# Install one by one
backpack_install -p

# If you want to set dir
backpack_install -d /path/to/myproject


# Uninstall all modules
backpack_install -u
# or with -d
backpack_install -u -d /path/to/laravel/project

# get help
backpack_install -h

# get version
backpack_install -v

After installation

Start Laravel.

php artisan serve

Visit http://127.0.0.1:8000/admin/login or http://127.0.0.1/admin/login depending the port you are using.

After uninstallation

After running uninstallation using -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.

Troubleshooting

backpack_install files must be executable.

chmod u+x backpack_install
chmod -R u+x lib

Author

Shinichi Okada

License

MIT License

Copyright (c) 2021 Shinichi Okada

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.