PHPackages                             afzalsabbir/backpack-devtools - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. afzalsabbir/backpack-devtools

ActiveLibrary

afzalsabbir/backpack-devtools
=============================

Custom auth for backpack

v1.0.2(3y ago)041MITPHP

Since Jun 2Pushed 3y ago1 watchersCompare

[ Source](https://github.com/AfzalSabbir/devtools)[ Packagist](https://packagist.org/packages/afzalsabbir/backpack-devtools)[ RSS](/packages/afzalsabbir-backpack-devtools/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

backpack-devtools
=================

[](#backpack-devtools)

about
-----

[](#about)

Our devtools helps to iterate quickly over models without too much of a hassle

This is done by several points:

- Providing an unique command line that performs all the operations

    ```
           sail artisan kda:backpack:migrate

    ```
- Providing a way to regenerate models without breaking changes (wip)
- Provide a way to automatically save and restore seeds in sql files with an history
- Provide a way to easily write generate diff migrations (wip)

install
-------

[](#install)

```
sail composer require fdt2k/backpack-devtools --prefer-source

```

Blueprint Installation
----------------------

[](#blueprint-installation)

optional sail artisan vendor:publish --tag=blueprint-config

### configure blueprint

[](#configure-blueprint)

edit config/blueprint.php

set

```
    'models_namespace' => 'BaseModels',

```

or whatever other namespace you want.

then replace the model migration generator with our own

```
'migration' => \KDA\Backpack\BlueprintMigrationGenerator::class,

```

in config/blueprint.php

#### model namespace

[](#model-namespace)

If you changed the namespace to other than BaseModels, you'll have to configure devtools

```
sail artisan vendor:publish --provider="KDA\Backpack\DevtoolsServiceProvider" --tag="config"

```

then change it in config/kda/backpack/devtools.php

```
'blueprint' => [
    'source'=> 'BaseModels',
    ]

```

Automatic Seeding configuration
-------------------------------

[](#automatic-seeding-configuration)

### automatic seeding

[](#automatic-seeding)

Automatic seeding helps during development, by automatically dumping specified tables and restoring them after the migration.

just put table into the settings

```
'seeds'=>[
    'sidebars',
    'users',
    'user_custom_lists',
],

```

without Seeders
---------------

[](#without-seeders)

by default you have not to worry about anything, kda:backpack:migrate will automatically reseeds with sql dumps

with Seeders
------------

[](#with-seeders)

disable autorestore on migrate by setting

```
'should_restore_seeds'=> false,

```

then create a seeder like this

```
