Change Egg Installation

Introduction

This is the installation guide for my Change Egg addon. 🥚


  • First you must upload all the files that are in the compressed folder that you downloaded.


  • In the file routes/api-client.php below the line:

    Route::get('/activity', Client\Servers\ActivityLogController::class)->name('api:client:server.activity');
  • Add the following lines:

    Route::group(['prefix' => '/eggchanger'], function () {
        Route::get('/current', [Client\Servers\EggChangerController::class, 'index']);
        Route::get('/geteggs', [Client\Servers\EggChangerController::class, 'getEggs']);
        Route::get('/getnests', [Client\Servers\EggChangerController::class, 'getNests']);
        Route::get('/getblacklisteggs', [Client\Servers\EggChangerController::class, 'getBlacklistEggs']);
        Route::get('/getblacklistnests', [Client\Servers\EggChangerController::class, 'getBlacklistNests']);
        Route::post('/update', [Client\Servers\EggChangerController::class, 'updateEgg']);
    });

  • Add the following lines to the end of the routes/admin.php file:

    /*
    |--------------------------------------------------------------------------
    | SubDomain Controller Routes
    |--------------------------------------------------------------------------
    |
    | Endpoint: /admin/changeegg
    |
    */
    Route::group(['prefix' => 'changeegg'], function () {
        Route::get('/', [Admin\ChangeEggController::class, 'index'])->name('admin.changeegg.index');
        Route::post('/create', [Admin\ChangeEggController::class, 'store'])->name('admin.changeegg.create');
        Route::delete('/delete/{id}', [Admin\ChangeEggController::class, 'destroy'])->name('admin.changeegg.delete');
    });

  • In the file /resources/scripts/routers/routes.ts add the following line under all imports

    import EggChangerContainer from '@/components/server/eggchanger/EggChangerContainer';
  • In the same file below these lines:

    {
        path: '/files/:action(edit|new)',
        permission: 'file.*',
        name: undefined,
        component: FileEditContainer,
    },
  • Add these lines:

    {
        path: '/changeegg',
        permission: 'file.*',
        name: 'ChangeEgg',
        component: EggChangerContainer,
    },

  • In the file /resources/views/layouts/admin.blade.php add the following lines:

    <li class="header">QUANTUM DEVELOPMENT</li>
    <li class="{{ ! starts_with(Route::currentRouteName(), 'admin.changeegg.index') ?: 'active' }}">
        <a href="{{ route('admin.changeegg.index') }}">
            <i class="fa fa-globe"></i> <span>ChangeEgg Manager</span>
        </a>
    </li>
  • Below these other lines:

    <li class="{{ ! starts_with(Route::currentRouteName(), 'admin.nests') ?: 'active' }}">
        <a href="{{ route('admin.nests') }}">
            <i class="fa fa-th-large"></i> <span>Nests</span>
        </a>
    </li>

After you have inserted all the lines correctly, please run the following commands in the /var/www/pterodactyl folder. Remember to have installed the necessary dependencies:

yarn build:production
php artisan migrate
php artisan optimize

If you have any problems please contact us through our discord.

Last updated