PHP code example of nedwors / hopper

1. Go to this page and download the library: Download nedwors/hopper library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

nedwors / hopper example snippets


'default-branch' => env('HOPPER_DEFAULT_BRANCH', 'main'),

'connections' => [
    'sqlite' => [
        'driver' => Sqlite::class,
        'database-path' => 'hopper/'
    ],
    'mysql' => [
        'driver' => MySql::class,
        'database-prefix' => 'hopper_'
    ],
],

'boot-checks' => [
    Environment::class
],

'post-creation-steps' => [
    'migrate:fresh'
]

...

'default-branch' => env('HOPPER_DEFAULT_BRANCH', 'main')

...

...

'connections' => [

    'sqlite' => [
        'driver' => Sqlite::class,
        'database-path' => 'hopper/'
    ],

    'mysql' => [
        'driver' => MySql::class,
        'database-prefix' => 'hopper_'
    ],

]

...

...

'connections' => [

    'sqlite' => [
        'driver' => Sqlite::class,
        'database-path' => 'hopper/'
    ],

]

...

...

'connections' => [

    'sqlite' => [
        'driver' => MySql::class,
        'database-prefix' => 'hopper_'
    ],

]

...

...

'connections' => [

    ...

    'newconnection' => [
        'driver' => NewConnection::class
    ],

    ...

]

...

...

'boot-checks' => [
    Environment::class
]

...

...

'post-creation-steps' => [
    'migrate:fresh --seed'
]

...

...

'post-creation-steps' => [
    'migrate:fresh',
    fn() => app(SpecificDatabaseSeeder::class)->run()
]

...
bash
php artisan hop awesome_new_feature
bash
php artisan hop
bash
php artisan hop --d
bash
php artisan hop:publish
bash
git checkout main

php artisan hop
bash
php artisan hop foobar
bash
php artisan hop --d
bash
php artisan hop test

php artisan hop:current

// Currently using test
bash
php artisan hop:delete test

// Deleted test
bash
php artisan hop test
bash
php artisan hop test