GithubHelp home page GithubHelp logo

backpack-import's Introduction

Backpack import

Install

  1. This package assumes you've already installed Backpack for Laravel. If you haven't, please install Backpack first.

  2. In your terminal:

composer require ckhandla94/backpack-import
  1. Run its migrations. Most likely it's:
php artisan migrate

Usage in your controller

Here's a simple example to use in your controller:

...
class ExampleCrudController extends CrudController
{
    ...
    use \BackpackImport\ImportOperation;

    public function importValidationRules()
    {
        return [
            'category_id' => 'required|exists:categories,id',
            'name'        => 'required|max:255',
            'duration'    => 'nullable|numeric',
            'price'       => 'nullable|numeric',
            'image'       => 'nullable',
            'description' => 'nullable|max:5000',
            'status'      => 'required',
        ];
    }
    ....

Preview

Import button in List page

Screenshot-3

Import page or Download sample file

Screenshot-1

Preview of the uploaded file and Maping with database

Screenshot-3

backpack-import's People

Contributors

ckhandla94 avatar neopheus avatar st-nann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

backpack-import's Issues

How to import id of the field with different attribute

example i have reservation table with relation on client,
in crud operations i using ids of client to store,
but for import i want use code client ,because id is hidden attributed ?

And how to make permission to import

Unable to locate publishable resources.

When I try to publish vendor with this command:

php artisan vendor:publish --provider="BackpackImport\BackpackImportServiceProvider"

return this error: Unable to locate publishable resources.

beforeImport should return $entities

In order to manipulate the "the fully resolved object" I think the method beforeImport should return something...

protected function beforeImport($entities)
{
    return $entities;
}

and above, the line 218 in the importProcess method, should be...

$entities = $this->beforeImport($entities);

[Responsive] Import Parse

When I import a lot of data columns. import-parse page not responsive table and select field.
Please help me. Thank you.
Ps. I send a merge request to you. Please check it.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.