Creating Complete Admin Panel Just in Few minutes

Today I want to introduce to you a new Laravel package for making Complete Admin Panel. It makes CRUD system automatically by few CLI commands. This is Laravel package named “Backpack“. This package support to make easy, fast and custom Admin panel. It performs CRUD (create, read, update and delete) entries, and those entries consist of fields and some options. It supports laravel version 5.2 and 5.3. If you don`t know laravel framework then you should understand it before and should know Laravel basics. I will prefer you to read the documentation of laravel`s official site.

https://laravel.com/docs/5.3/

you can change the version of documentation lower from 5.3

before starting Lets take a look at backpackforlaravel.com‘s homepage.

Lets get starting.

  1. install composer on your local machine. you can download composer https://getcomposer.org/ and run composer cmd to make sure that composer is correctly working. It will show some information about composer you installed.
  2. After this, Go to your www/ directory if you are using wamp server otherwise htdocs if your are using Mampp or Xampp then run the command
    composer create-project --prefer-dist laravel/laravel backpack

    you can give any name for project. For now m giving name “backpack”

  3. Wait for few minutes and let to install the all dependencies for “backpack” project. Configure your database in your .env file.
  4. After installation and configation complete run command
    php artisan serve

    I already installed laravel package name “backpack”

  5. Now open another CMD windows to run Artisan commands. I m going to install backpack package in my “backpack” project.
  6. Before installing this lets few know about backpack package
  7. there are two sub-packages that holds the backpack feature also called Core Packages
    • Base – provides the layout (blade files, html and js)
    • CRUD – provides the logic for all CRUD operations
  8. and other are Ready-built CRUDs
    • PermissionManager – interface to manage users & permissions;
    • Settings – interface to edit site-wide settings;
    • PageManager – CRUD for custom pages, using page templates;
    • MenuCRUD
    • NewsCRUD
  9. and extensions are
    • LangFileManager – interface to edit Laravel language files
    • LogManager – interface to preview Laravel log files
    • BackupManager – interface to backup your files & db
  10. Now come back to installation,
    1. We are installing it on laravel 5.3 version Base Package for now .Type command in your terminal
      composer require backpack/base
    2. Add these service providers lines in config/app.php, at the end of the providers array:
      /*
      * Backpack Service Providers...
      */
      Backpack\Base\BaseServiceProvider::class,
    3. Then run a few commands in the terminal:
      php artisan vendor:publish --provider="Backpack\Base\BaseServiceProvider" 
      php artisan vendor:publish --provider="Prologue\Alerts\AlertsServiceProvider"
      php artisan migrate 
    4. Your Backpack Base package has been installed.
    5. [optional] Backpack comes with a generators package that helps you create models, controllers, requests, etc from the command line. laracasts/generators is an awesome package you can use to generate migrations.
      this package provides CLIs to make quick CURDs operations. Install this generator package using these commands.

      composer require backpack/generators --dev
      composer require laracasts/generators --dev
    6. Now installing CRUD package. In your terminal,
      composer require backpack/crud
    7. Add this provider to your config/app.php, after “base”,
              Backpack\CRUD\CrudServiceProvider::class,
    8. Run these command in this exact order:
      php artisan elfinder:publish
      php artisan vendor:publish --provider="Backpack\CRUD\CrudServiceProvider" 
      --tag="public"
      php artisan vendor:publish --provider="Backpack\CRUD\CrudServiceProvider" 
      --tag="lang" 
      php artisan vendor:publish --provider="Backpack\CRUD\CrudServiceProvider" 
      --tag="config"
      php artisan vendor:publish --provider="Backpack\CRUD\CrudServiceProvider" 
      --tag="elfinder"
    9. Define an ‘uploads’ disk. In your config/filesystems.php add this disk:
      'uploads' => [
                  'driver' => 'local',
                  'root' => public_path('uploads'),
              ],
    10. Create “uploads” folder in your public folder.
    11. [Optional] You can now add the file manager to the menu, in resources/views/vendor/backpack/base/inc/sidebar.blade.php or menu.blade.php:
      <li>
      <a href="{{ url(config('backpack.base.route_prefix','admin') . '/elfinder') }}
      ">
      <i class="fa fa-files-o"></i> <span>File manager</span></a></li>

      After this, your backpack CRUD package has been successfully installed and you can make your own crud operations. I will show you how to install ready build crud operations and how to make your own Enitty Crud Operations and how to customize overall backpack package admin panel in next tutorial. Thank and Bye.

NO COMMENTS

LEAVE A REPLY