From 74e3c336f8f7983b8e324bcfb2a7fec2878f83ac Mon Sep 17 00:00:00 2001 From: AVMG20 Date: Thu, 10 Jun 2021 17:41:47 +0200 Subject: [PATCH] Seeding changes --- .env.dev | 73 ------------------- .env.example | 6 +- ...06_09_213306_create_useful_links_table.php | 25 ------- database/seeders/ExampleItemsSeeder.php | 1 + database/seeders/UsefulLinksSeeder.php | 42 +++++++++++ 5 files changed, 46 insertions(+), 101 deletions(-) delete mode 100644 .env.dev create mode 100644 database/seeders/UsefulLinksSeeder.php diff --git a/.env.dev b/.env.dev deleted file mode 100644 index 3538e182..00000000 --- a/.env.dev +++ /dev/null @@ -1,73 +0,0 @@ -APP_NAME=Laravel -APP_ENV=local -APP_KEY= -APP_DEBUG=true -APP_URL=http://localhost - -LOG_CHANNEL=stack -LOG_LEVEL=debug - -DB_CONNECTION=mysql -DB_HOST=controlpanel_mysql -DB_PORT=3306 -DB_DATABASE=controlpanel -DB_USERNAME=root -DB_PASSWORD=root - -PAYPAL_SANDBOX_SECRET= -PAYPAL_SANDBOX_CLIENT_ID= -PAYPAL_SECRET= -PAYPAL_CLIENT_ID= -PAYPAL_EMAIL= - -DISCORD_INVITE_URL=https://discord.gg/vrUYdxG4wZ -#set-up for extra discord verification -DISCORD_CLIENT_ID= -DISCORD_CLIENT_SECRET= -DISCORD_REDIRECT_URI=http://YOUR_DOMAIN.COM/auth/callback -#set-up will join users automaticly to your discord -DISCORD_BOT_TOKEN=YOUR_DISCORD_BOT_TOKEN -DISCORD_GUILD_ID=YOUR_DISCORD_SERVER_ID - -PTERODACTYL_TOKEN= -PTERODACTYL_URL=https://panel.bitsec.dev -PHPMYADMIN_URL=https://mysql.bitsec.dev - - -RECAPTCHA_SITE_KEY=YOUR_API_SITE_KEY -RECAPTCHA_SECRET_KEY=YOUR_API_SECRET_KEY - - -BROADCAST_DRIVER=log -CACHE_DRIVER=file -QUEUE_CONNECTION=database -SESSION_DRIVER=file -SESSION_LIFETIME=120 - -MEMCACHED_HOST=127.0.0.1 - -REDIS_HOST=127.0.0.1 -REDIS_PASSWORD=null -REDIS_PORT=6379 - -MAIL_MAILER=smtp -MAIL_HOST=mailhog -MAIL_PORT=1025 -MAIL_USERNAME=null -MAIL_PASSWORD=null -MAIL_ENCRYPTION=null -MAIL_FROM_ADDRESS=null -MAIL_FROM_NAME="${APP_NAME}" - -AWS_ACCESS_KEY_ID= -AWS_SECRET_ACCESS_KEY= -AWS_DEFAULT_REGION=us-east-1 -AWS_BUCKET= - -PUSHER_APP_ID= -PUSHER_APP_KEY= -PUSHER_APP_SECRET= -PUSHER_APP_CLUSTER=mt1 - -MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" -MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" diff --git a/.env.example b/.env.example index 368b1bde..fabecd2d 100644 --- a/.env.example +++ b/.env.example @@ -5,11 +5,11 @@ APP_DEBUG=false APP_URL=http://localhost DB_CONNECTION=mysql -DB_HOST=127.0.0.1 +DB_HOST=controlpanel_mysql DB_PORT=3306 -DB_DATABASE=laravel +DB_DATABASE=controlpanel DB_USERNAME=root -DB_PASSWORD= +DB_PASSWORD=root PAYPAL_SANDBOX_SECRET= PAYPAL_SANDBOX_CLIENT_ID= diff --git a/database/migrations/2021_06_09_213306_create_useful_links_table.php b/database/migrations/2021_06_09_213306_create_useful_links_table.php index fa479ac6..a604e969 100644 --- a/database/migrations/2021_06_09_213306_create_useful_links_table.php +++ b/database/migrations/2021_06_09_213306_create_useful_links_table.php @@ -22,31 +22,6 @@ class CreateUsefulLinksTable extends Migration $table->string('message')->default('Default Message'); $table->timestamps(); }); - - \App\Models\UsefulLink::create([ - 'icon' => 'fas fa-egg', - 'title' => 'Pterodactyl Panel', - 'link' => env('PTERODACTYL_URL' , 'http://localhost'), - 'message' => 'Use your servers on our pterodactyl panel (You can use the same login details)' - ]); - \App\Models\UsefulLink::create([ - 'icon' => 'fas fa-database', - 'title' => 'phpMyAdmin', - 'link' => env('PHPMYADMIN_URL' , 'http://localhost'), - 'message' => 'View your database online using phpMyAdmin' - ]); - \App\Models\UsefulLink::create([ - 'icon' => 'fab fa-discord', - 'title' => 'Discord', - 'link' => env('DISCORD_INVITE_URL'), - 'message' => 'Need a helping hand? Want to chat? Got any questions? Join our discord!' - ]); - \App\Models\UsefulLink::create([ - 'icon' => 'fas fa-link', - 'title' => 'Useful Links', - 'link' => '_blank', - 'message' => 'Want to make your own links that show here? Use the command php artisan create:usefullink
Delete links via database (for now)' - ]); } /** diff --git a/database/seeders/ExampleItemsSeeder.php b/database/seeders/ExampleItemsSeeder.php index f48d0463..5814b90f 100644 --- a/database/seeders/ExampleItemsSeeder.php +++ b/database/seeders/ExampleItemsSeeder.php @@ -17,6 +17,7 @@ class ExampleItemsSeeder extends Seeder ProductSeeder::class, PaypalProductSeeder::class, ApplicationApiSeeder::class, + UsefulLinksSeeder::class ]); } diff --git a/database/seeders/UsefulLinksSeeder.php b/database/seeders/UsefulLinksSeeder.php new file mode 100644 index 00000000..fadc534e --- /dev/null +++ b/database/seeders/UsefulLinksSeeder.php @@ -0,0 +1,42 @@ + 'fas fa-egg', + 'title' => 'Pterodactyl Panel', + 'link' => env('PTERODACTYL_URL', 'http://localhost'), + 'message' => 'Use your servers on our pterodactyl panel (You can use the same login details)' + ]); + UsefulLink::create([ + 'icon' => 'fas fa-database', + 'title' => 'phpMyAdmin', + 'link' => env('PHPMYADMIN_URL', 'http://localhost'), + 'message' => 'View your database online using phpMyAdmin' + ]); + UsefulLink::create([ + 'icon' => 'fab fa-discord', + 'title' => 'Discord', + 'link' => env('DISCORD_INVITE_URL'), + 'message' => 'Need a helping hand? Want to chat? Got any questions? Join our discord!' + ]); + UsefulLink::create([ + 'icon' => 'fas fa-link', + 'title' => 'Useful Links', + 'link' => '_blank', + 'message' => 'Want to make your own links that show here? Use the command php artisan create:usefullink
Delete links via database (for now)' + ]); + } +}