F1.10 Php Laravel(Lumen) generate helper commands (Wpf, Xamarin, Angular SPA, Reactjs SPA) - chempkovsky/CS2WPF-and-CS2XAMARIN GitHub Wiki

Note:

This step is optional. You don't need it if "php artisan db"-command is avalable for you.

We mean the following:

picture

  • We are going to extend artisan with two additional commands
    • to create new database on the Sql server
      • command:crtdb
    • to drop database on the Sql server
      • command:dropdb

How to generate the commands:

  • with Visual Strudio right click
    • app-folder
  • select "Add/Wpf Forms Wizard"

picture

  • with "Wpf Forms Wizard" click "Next" on the first page

picture

  • on the second page of "Wpf Forms Wizard"
    • select LitDbContext or any avalable context
    • click "Next"

picture

  • on the third page of "Wpf Forms Wizard"
    • select ==Context==
    • click "Next"

picture

  • on the fourth page of "Wpf Forms Wizard"
    • click "batch processing"-button

picture

  • on the "Batch Actions"-dialog
    • select 00180-LaravelCommands.json
    • click start

picture

  • Close "Batch Actions"-dialog
  • Close "Wpf Forms Wizard"-dialog
  • here is a result

picture

Note:

  • For the Laravel project generated commands are ready to be used.
  • Lumen project requires app\Console\Kernel.php to be modified.

app\Console\Kernel.php of the Lumen project:

Open app\Console\Kernel.php and modify the "$commands"--var:

    protected $commands = [
        Crtdb::class,
        Dropdb::class,
    ];

picture