ckhandla94 / backpack-import
Installs: 26 805
Dependents: 0
Suggesters: 0
Security: 0
Stars: 17
Watchers: 4
Forks: 13
Open Issues: 6
This package is auto-updated.
Last update: 2025-03-14 12:51:14 UTC
README
Install
-
This package assumes you've already installed Backpack for Laravel. If you haven't, please install Backpack first.
-
In your terminal:
composer require ckhandla94/backpack-import
- 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',
];
}
....