A web interface to generate migrations, models and CRUDs. Forget about the command line. Forget about migration types. Go from idea to full CRUD in seconds.

![Dev 1](https://user-images.githubusercontent.com/1032474/128379216-72ae55fa-fcff-4747-8c35-42c733923c94.gif)

Why?
What's your current process, when creating an entity in your project? We bet you need:

a migration;
a model;
maybe a factory and a seeder;
then you need an admin panel for it, so you create a CrudController, CrudRequest, route and sidebar item;
Haven't you gotten tired of doing that, for each new entity? We have. Not only is it boring and repetitive... it takes quite a bit of time to get just right. We've all tried to speed this up using existing tools. Hell, we've even contributed or taken over their maintenance:

we've used laracasts/generators for migrations and models, but it's difficult to generate a final migration in one command line; we always forget stuff... and it doesn't generate relationships;
we've used laravel-shift/blueprint for migrations and models with relationships, but then you have to learn&remember the Blueprint YAML syntax; we forget it, so we get into a back-and-forth between the Blueprint docs, the Laravel migration docs, the YAML file and the generated files;
then for CRUDs, we always use siberfx/generators, but... it doesn't fill in the CrudRequest or the fields & columns... it's a technical limitation... so we have to punch in every column/field we want afterwards;
We're super-grateful to the creators of those tools. We've been using them for years and contributed to their projects as much as possible. But... we've always felt we can do better. So we did.

We're web developers, so we've created a web interface (😱 ), which uses those exact tools behind the scenes, connects them and polishes the generated files, automatically. We thought it would take us a few days, maybe weeks, but after quite a few months of working at this, we can finally say we've got something better. Something much much better.

Thanks to this package, creating new entities is no longer boring, or tedious. It's actually... fun 😀 We think you'll absolutely love this new way of starting your Laravel projects... In fact, we think you won't be able to go back to writing them by hand. We know we can't 😀

Features
Generate full entities in seconds
Thanks to Siberfx\Devtools, you can just fill in one form:

![Dev 2](https://user-images.githubusercontent.com/1032474/128375953-72b637c5-75cd-4626-a36b-e49f9f4d9952.png)

And you can get:

a complete migration;
a model with fillable and relationships already written;
a seeder and factory with the columns defined;
a CrudController with the fields & columns already defined;
a CrudRequest with the validation rules already inferred from the database restrictions;
a route and sidebar item for the admin panel;
That's a full working CRUD, you can go ahead and add items from the admin interface.

No, really. Here's what the form above generated:

![Dev 3](https://user-images.githubusercontent.com/1032474/128376790-8bd06869-6a7c-45c1-8328-14aacd9d178a.gif)
Manage your database migrations in a web interface
No more dumpster-diving into the database/migrations directory. Easily see your migrations, which ones are run, run them, roll them back and even open them in your editor to slighly polish them.

![Dev 4](https://user-images.githubusercontent.com/1032474/128332124-acd2e3d9-c79e-42d0-9c7b-dfc0c8bbd6d3.gif)

Manage your models in a web interface
See the state of your Models, which ones have CRUDs, which ones have factories and seeders and insert dummy data right then&there.

![Dev 5](https://user-images.githubusercontent.com/1032474/128380633-1897f33f-0224-410c-b63e-b1d4fea9202f.gif)

Generate custom admin panel components
[UNDER DEVELOPMENT] Soon enough, this package will also help you:

use templates to create a custom Siberfx blade files - columns, fields, filters, buttons, widgets;
use templates to create custom Siberfx Operations;
create completely custom Siberfx pages (like dashboards);
You can forget about using the command line for those things. You can forget about looking inside the vendor/siberfx/crud folder to see what you want to overwrite or get inspiration from. You think it, you click it, you have it.

Requirements
Siberfx DevTools assumes that you already have:

- Laravel 8+
- PHP 7.3+
- MySQL 5.7.x / 8.x
- SQLite 3.36+ (eg. pdo_sqlite extension enabled)
- siberfx/crud v4.1+ properly installed

 
Installation
Quick Installation
In your Laravel + Siberfx project, run:
```php
php artisan siberfx:require:devtools
```
It will ask you for your token & password - which you get after you purchase this package. If you've purchased previously, you can see your token and password in your Siberfx account.

Manual Installation
Alternatively, if the quick installation above doesn't work, here are the steps you can take:

Step 1. Buy access to this package and you'll get an access token. With that token in hand, you should instruct your project to pull in DevTools from our private repository, instead of Packagist:

add your token to your project's auth.json file by running composer config http-basic.siberfx.com [your-token-username] [your-token-password]
add the Siberfx private repo to your composer.json:
```php
    "repositories": [
        {
            "type": "composer",
            "url": "https://repo.siberfx.com/"
        }
    ],
```
Step 2. Install the package using Composer:

# Recommended - get latest DevTools version and update dependencies (siberfx, livewire, sushi, blueprint)
```php
composer require --dev --with-all-dependencies siberfx/devtools
```

# Alternatively - get the version of DevTools you can install without updating anything
```php
composer require --dev siberfx/devtools
```
Common errors:

composer require conflict - run the recommended method above or composer update, to get the latest version;
Error 500 Class X does not seem to be auto-loaded - run the recommended method above or composer update, to get the latest version;
Step 3. Run the installation command and follow the instructions:

```php
php artisan siberfx:devtools:install
```
That's it. You can now visit your-app-name/admin/devtools to use DevTools. The rest is point&click.

SUPER-IMPORTANT!!! You must make sure your staging and production environments DO NOT include the DevTools interface and functionality:

if you auto-deploy your project using composer & git (using Laravel Forge, Envoyer or anything else), make sure that you're running composer install --no-dev;
if you deploy your project by uploading a ZIP file or FTP the files, make sure you upload builds after you've run ```php composer install --no-dev ```
alternatively, after you're done generating stuff using DevTools, just do ```php composer remove --dev siberfx/devtools ``` , that'll get rid of it; or include that command in your build pipeline;
Support
To submit issues, bugs and feature requests, please see our siberfx/devtools-issues repo on Github.

Security
If you discover any security related issues, please email info@siberfx.com instead of using the issue tracker.
