├── .editorconfig ├── .gitattributes ├── .github └── workflows │ └── main.yml ├── .gitignore ├── .styleci.yml ├── Dockerfile ├── LICENSE ├── README.md ├── app ├── Console │ ├── Commands │ │ └── CreateDatabaseCommand.php │ └── Kernel.php ├── Exceptions │ └── Handler.php ├── Http │ ├── Controllers │ │ ├── AccountController.php │ │ ├── ApiController.php │ │ ├── Auth │ │ │ ├── AuthenticatedSessionController.php │ │ │ ├── ConfirmPasswordController.php │ │ │ ├── ConfirmablePasswordController.php │ │ │ ├── EmailVerificationNotificationController.php │ │ │ ├── EmailVerificationPromptController.php │ │ │ ├── ForgotPasswordController.php │ │ │ ├── LoginController.php │ │ │ ├── NewPasswordController.php │ │ │ ├── PasswordResetLinkController.php │ │ │ ├── RegisterController.php │ │ │ ├── RegisteredUserController.php │ │ │ ├── ResetPasswordController.php │ │ │ ├── VerificationController.php │ │ │ └── VerifyEmailController.php │ │ ├── Controller.php │ │ ├── DNSController.php │ │ ├── DiskSpeedController.php │ │ ├── DomainsController.php │ │ ├── HomeController.php │ │ ├── IPsController.php │ │ ├── LabelsController.php │ │ ├── LocationsController.php │ │ ├── MiscController.php │ │ ├── NetworkSpeedController.php │ │ ├── NoteController.php │ │ ├── OsController.php │ │ ├── PricingController.php │ │ ├── ProvidersController.php │ │ ├── ResellerController.php │ │ ├── SeedBoxesController.php │ │ ├── ServerController.php │ │ ├── SettingsController.php │ │ ├── SharedController.php │ │ └── YabsController.php │ ├── Kernel.php │ ├── Middleware │ │ ├── Authenticate.php │ │ ├── EncryptCookies.php │ │ ├── PreventRequestsDuringMaintenance.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── TrimStrings.php │ │ ├── TrustHosts.php │ │ ├── TrustProxies.php │ │ └── VerifyCsrfToken.php │ └── Requests │ │ └── Auth │ │ └── LoginRequest.php ├── Models │ ├── DNS.php │ ├── DiskSpeed.php │ ├── Domains.php │ ├── Home.php │ ├── IPs.php │ ├── Labels.php │ ├── LabelsAssigned.php │ ├── Locations.php │ ├── Misc.php │ ├── NetworkSpeed.php │ ├── Note.php │ ├── OS.php │ ├── Pricing.php │ ├── Providers.php │ ├── Reseller.php │ ├── SeedBoxes.php │ ├── Server.php │ ├── Settings.php │ ├── Shared.php │ ├── User.php │ └── Yabs.php ├── Process.php ├── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php └── View │ └── Components │ ├── AppLayout.php │ ├── CurrencySelect.php │ ├── GuestLayout.php │ ├── LabelsSelect.php │ ├── LocationsSelect.php │ ├── OsSelect.php │ ├── PricingSelect.php │ ├── ProvidersSelect.php │ └── TermSelect.php ├── artisan ├── bootstrap ├── app.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── cors.php ├── custom.php ├── database.php ├── datatables.php ├── filesystems.php ├── hashing.php ├── logging.php ├── mail.php ├── queue.php ├── services.php ├── session.php └── view.php ├── database ├── .gitignore ├── factories │ ├── DNSFactory.php │ ├── DomainsFactory.php │ ├── ServerFactory.php │ └── UserFactory.php ├── migrations │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2021_02_10_122904_create_servers_table.php │ ├── 2022_01_30_112059_create_providers_table.php │ ├── 2022_01_30_112350_create_locations_table.php │ ├── 2022_02_01_031629_create_os_table.php │ ├── 2022_02_01_233932_create_domains_table.php │ ├── 2022_02_02_005352_create_d_n_s_table.php │ ├── 2022_02_03_035702_create_labels_table.php │ ├── 2022_02_03_040140_create_shareds_table.php │ ├── 2022_02_03_040152_create_resellers_table.php │ ├── 2022_02_05_104355_create_yabs_table.php │ ├── 2022_02_05_104551_create_disk_speed_table.php │ ├── 2022_02_05_104919_create_network_speed_table.php │ ├── 2022_02_05_105219_create_pricing_table.php │ ├── 2022_02_08_010323_create_labels_assigned_table.php │ ├── 2022_02_09_032438_create_settings_table.php │ ├── 2022_02_11_022150_create_miscs_table.php │ ├── 2022_02_21_001233_create_ips_table.php │ ├── 2022_03_05_125635_add_cols_to_settings.php │ ├── 2022_03_09_022939_add_homepage_amount_cols_to_settings.php │ ├── 2022_05_09_114227_add_foreign_keys.php │ ├── 2022_05_09_154509_add_dark_mode_setting.php │ ├── 2022_05_15_105254_create_seedboxes_table.php │ ├── 2022_05_29_105255_add_dash_currency_setting.php │ ├── 2022_06_24_010658_alter_yabs_foreign_key.php │ ├── 2022_06_24_023931_alter_yabs_foreign_key_delete.php │ ├── 2022_07_20_011250_add_columns_to_yabs_table.php │ ├── 2022_07_20_015804_add_column_to_settings_table.php │ ├── 2022_09_22_020501_update_yabs_table.php │ ├── 2022_10_04_002543_add_sort_on_to_settings_table.php │ ├── 2022_12_02_000007_create_notes_table.php │ ├── 2023_03_31_001352_add_favicon_to_settings_table.php │ ├── 2023_09_20_121309_add_gb6_to_yabs_table.php │ └── 2024_12_09_055453_add_whois_columns_to_ips_table.php └── seeders │ ├── DatabaseSeeder.php │ ├── DomainsSeeder.php │ ├── LabelsSeeder.php │ ├── LocationsSeeder.php │ ├── OsSeeder.php │ ├── ProvidersSeeder.php │ ├── ServersSeeder.php │ ├── SettingsSeeder.php │ └── SharedSeeder.php ├── package-lock.json ├── package.json ├── phpunit.xml ├── public ├── .htaccess ├── My Idlers logo.jpg ├── css │ ├── app.css │ ├── dark.css │ └── light.css ├── favicon.ico ├── index.php ├── js │ ├── app.js │ └── app.js.LICENSE.txt ├── mix-manifest.json ├── robots.txt ├── web.config └── webfonts │ ├── fa-brands-400.ttf │ ├── fa-brands-400.woff2 │ ├── fa-regular-400.ttf │ ├── fa-regular-400.woff2 │ ├── fa-solid-900.ttf │ └── fa-solid-900.woff2 ├── resources ├── css │ ├── app.css │ ├── dark.css │ ├── light.css │ └── style.css ├── js │ ├── app.js │ └── bootstrap.js ├── lang │ └── en │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php ├── sass │ ├── _variables.scss │ └── app.scss └── views │ ├── account │ └── index.blade.php │ ├── auth │ ├── confirm-password.blade.php │ ├── forgot-password.blade.php │ ├── login.blade.php │ ├── passwords │ │ ├── confirm.blade.php │ │ ├── email.blade.php │ │ └── reset.blade.php │ ├── register.blade.php │ ├── reset-password.blade.php │ ├── verify-email.blade.php │ └── verify.blade.php │ ├── components │ ├── application-logo.blade.php │ ├── auth-card.blade.php │ ├── auth-session-status.blade.php │ ├── auth-validation-errors.blade.php │ ├── back-btn.blade.php │ ├── back-button.blade.php │ ├── button.blade.php │ ├── card.blade.php │ ├── cont-card.blade.php │ ├── currency-select.blade.php │ ├── datatables-assets.blade.php │ ├── date-input.blade.php │ ├── delete-confirm-modal.blade.php │ ├── details-footer.blade.php │ ├── disk-type-select.blade.php │ ├── dropdown-link.blade.php │ ├── dropdown.blade.php │ ├── edit-btn.blade.php │ ├── form-check.blade.php │ ├── form-style.blade.php │ ├── info-card.blade.php │ ├── input.blade.php │ ├── label.blade.php │ ├── labels-select.blade.php │ ├── locations-select.blade.php │ ├── login-card.blade.php │ ├── modal-delete-script.blade.php │ ├── modal-style.blade.php │ ├── nav-link.blade.php │ ├── number-input.blade.php │ ├── os-select.blade.php │ ├── pricing-select.blade.php │ ├── providers-select.blade.php │ ├── ram-type-select.blade.php │ ├── response-alerts.blade.php │ ├── responsive-nav-link.blade.php │ ├── service-tally-card.blade.php │ ├── submit-button.blade.php │ ├── term-select.blade.php │ ├── text-input.blade.php │ └── yes-no-select.blade.php │ ├── dns │ ├── create.blade.php │ ├── edit.blade.php │ ├── index.blade.php │ └── show.blade.php │ ├── domains │ ├── create.blade.php │ ├── edit.blade.php │ ├── index.blade.php │ └── show.blade.php │ ├── errors │ ├── 401.blade.php │ ├── 403.blade.php │ ├── 404.blade.php │ ├── 419.blade.php │ ├── 429.blade.php │ ├── 500.blade.php │ ├── 503.blade.php │ ├── layout.blade.php │ └── minimal.blade.php │ ├── home.blade.php │ ├── ips │ ├── create.blade.php │ └── index.blade.php │ ├── labels │ ├── create.blade.php │ ├── index.blade.php │ └── show.blade.php │ ├── layouts │ ├── app.blade.php │ ├── guest.blade.php │ ├── index.blade.php │ └── navigation.blade.php │ ├── locations │ ├── create.blade.php │ ├── index.blade.php │ └── show.blade.php │ ├── misc │ ├── create.blade.php │ ├── edit.blade.php │ ├── index.blade.php │ └── show.blade.php │ ├── notes │ ├── create.blade.php │ ├── edit.blade.php │ ├── index.blade.php │ └── show.blade.php │ ├── os │ ├── create.blade.php │ └── index.blade.php │ ├── providers │ ├── create.blade.php │ ├── index.blade.php │ └── show.blade.php │ ├── reseller │ ├── create.blade.php │ ├── edit.blade.php │ ├── index.blade.php │ └── show.blade.php │ ├── seedboxes │ ├── create.blade.php │ ├── edit.blade.php │ ├── index.blade.php │ └── show.blade.php │ ├── servers │ ├── choose-compare.blade.php │ ├── compare.blade.php │ ├── create.blade.php │ ├── edit.blade.php │ ├── index-cards.blade.php │ ├── index.blade.php │ ├── public-index.blade.php │ └── show.blade.php │ ├── settings │ └── index.blade.php │ ├── shared │ ├── create.blade.php │ ├── edit.blade.php │ ├── index.blade.php │ └── show.blade.php │ └── yabs │ ├── choose-compare.blade.php │ ├── compare.blade.php │ ├── index.blade.php │ └── show.blade.php ├── routes ├── api.php ├── auth.php ├── channels.php ├── console.php └── web.php ├── run.sh ├── server.php ├── storage ├── app │ ├── .gitignore │ └── public │ │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ ├── .gitignore │ │ └── data │ │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore ├── tailwind.config.js ├── tests ├── CreatesApplication.php ├── Feature │ ├── Auth │ │ ├── AuthenticationTest.php │ │ ├── EmailVerificationTest.php │ │ ├── PasswordConfirmationTest.php │ │ ├── PasswordResetTest.php │ │ └── RegistrationTest.php │ ├── AuthenticationTest.php │ ├── EmailVerificationTest.php │ ├── PasswordConfirmationTest.php │ ├── PasswordResetTest.php │ └── RegistrationTest.php ├── TestCase.php └── Unit │ └── ExampleTest.php └── webpack.mix.js /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | indent_style = space 8 | indent_size = 4 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.{yml,yaml}] 15 | indent_size = 2 16 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | *.js linguist-vendored 5 | CHANGELOG.md export-ignore 6 | 7 | /public/css/* -diff 8 | /public/js/* -diff 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ### Laravel ### 2 | vendor/ 3 | node_modules/ 4 | npm-debug.log 5 | 6 | # Laravel 4 specific 7 | bootstrap/compiled.php 8 | app/storage/ 9 | 10 | # Laravel 5 & Lumen specific 11 | public/storage 12 | public/hot 13 | storage/*.key 14 | .env.*.php 15 | .env.php 16 | .env 17 | Homestead.yaml 18 | Homestead.json 19 | 20 | # Rocketeer PHP task runner and deployment package. https://github.com/rocketeers/rocketeer 21 | .rocketeer/ 22 | 23 | # Created by https://www.gitignore.io/api/phpstorm 24 | 25 | ### PhpStorm ### 26 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm 27 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 28 | 29 | # User-specific stuff: 30 | .idea/ 31 | 32 | ## File-based project format: 33 | *.iws 34 | 35 | ## Plugin-specific files: 36 | 37 | # IntelliJ 38 | /out/ 39 | 40 | # mpeltonen/sbt-idea plugin 41 | .idea_modules/ 42 | 43 | # JIRA plugin 44 | atlassian-ide-plugin.xml 45 | 46 | # Crashlytics plugin (for Android Studio and IntelliJ) 47 | com_crashlytics_export_strings.xml 48 | crashlytics.properties 49 | crashlytics-build.properties 50 | fabric.properties 51 | 52 | ### PhpStorm Patch ### 53 | # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 54 | 55 | # *.iml 56 | # modules.xml 57 | # .idea/misc.xml 58 | # *.ipr 59 | storage/clockwork/ 60 | !public/ 61 | -------------------------------------------------------------------------------- /.styleci.yml: -------------------------------------------------------------------------------- 1 | php: 2 | preset: laravel 3 | disabled: 4 | - no_unused_imports 5 | finder: 6 | not-name: 7 | - index.php 8 | - server.php 9 | js: 10 | finder: 11 | not-name: 12 | - webpack.mix.js 13 | css: true 14 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:8.2-fpm-alpine 2 | 3 | RUN docker-php-ext-install pdo pdo_mysql sockets 4 | RUN curl -sS https://getcomposer.org/installer | php -- \ 5 | --install-dir=/usr/local/bin --filename=composer 6 | 7 | COPY --from=composer:latest /usr/bin/composer /usr/bin/composer 8 | 9 | WORKDIR /app 10 | COPY . . 11 | RUN composer install 12 | 13 | ENV APP_ENV production 14 | ENTRYPOINT ["/app/run.sh"] 15 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 corbpie 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /app/Console/Commands/CreateDatabaseCommand.php: -------------------------------------------------------------------------------- 1 | argument('name') ?: config("database.connections.mysql.database"); 22 | $charset = config("database.connections.mysql.charset",'utf8mb4'); 23 | $collation = config("database.connections.mysql.collation",'utf8mb4_unicode_ci'); 24 | 25 | config(["database.connections.mysql.database" => null]); 26 | 27 | $query = "CREATE DATABASE IF NOT EXISTS $schemaName CHARACTER SET $charset COLLATE $collation;"; 28 | 29 | DB::statement($query); 30 | 31 | config(["database.connections.mysql.database" => $schemaName]); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire')->hourly(); 28 | } 29 | 30 | /** 31 | * Register the commands for the application. 32 | * 33 | * @return void 34 | */ 35 | protected function commands() 36 | { 37 | $this->load(__DIR__.'/Commands'); 38 | 39 | require base_path('routes/console.php'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | reportable(function (Throwable $e) { 37 | // 38 | }); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/Http/Controllers/AccountController.php: -------------------------------------------------------------------------------- 1 | name = $request->name; 20 | $user->email = $request->email; 21 | $user->save(); 22 | 23 | return redirect()->route('account.index') 24 | ->with('success', 'Account Updated Successfully.'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/AuthenticatedSessionController.php: -------------------------------------------------------------------------------- 1 | count() === 0) {//Only allow 1 user for this app 23 | return redirect('/register'); 24 | } 25 | return view('auth.login'); 26 | } 27 | 28 | /** 29 | * Handle an incoming authentication request. 30 | * 31 | * @param \App\Http\Requests\Auth\LoginRequest $request 32 | * @return \Illuminate\Http\RedirectResponse 33 | */ 34 | public function store(LoginRequest $request) 35 | { 36 | $request->authenticate(); 37 | 38 | $request->session()->regenerate(); 39 | 40 | return redirect()->intended(RouteServiceProvider::HOME); 41 | } 42 | 43 | /** 44 | * Destroy an authenticated session. 45 | * 46 | * @param \Illuminate\Http\Request $request 47 | * @return \Illuminate\Http\RedirectResponse 48 | */ 49 | public function destroy(Request $request) 50 | { 51 | Auth::guard('web')->logout(); 52 | 53 | $request->session()->invalidate(); 54 | 55 | $request->session()->regenerateToken(); 56 | 57 | return redirect('/'); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ConfirmPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ConfirmablePasswordController.php: -------------------------------------------------------------------------------- 1 | validate([ 32 | 'email' => $request->user()->email, 33 | 'password' => $request->password, 34 | ])) { 35 | throw ValidationException::withMessages([ 36 | 'password' => __('auth.password'), 37 | ]); 38 | } 39 | 40 | $request->session()->put('auth.password_confirmed_at', time()); 41 | 42 | return redirect()->intended(RouteServiceProvider::HOME); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/EmailVerificationNotificationController.php: -------------------------------------------------------------------------------- 1 | user()->hasVerifiedEmail()) { 20 | return redirect()->intended(RouteServiceProvider::HOME); 21 | } 22 | 23 | $request->user()->sendEmailVerificationNotification(); 24 | 25 | return back()->with('status', 'verification-link-sent'); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/EmailVerificationPromptController.php: -------------------------------------------------------------------------------- 1 | user()->hasVerifiedEmail() 20 | ? redirect()->intended(RouteServiceProvider::HOME) 21 | : view('auth.verify-email'); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ForgotPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest')->except('logout'); 39 | } 40 | 41 | 42 | } 43 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/PasswordResetLinkController.php: -------------------------------------------------------------------------------- 1 | validate([ 32 | 'email' => ['required', 'email'], 33 | ]); 34 | 35 | // We will send the password reset link to this user. Once we have attempted 36 | // to send the link, we will examine the response then see the message we 37 | // need to show to the user. Finally, we'll send out a proper response. 38 | $status = Password::sendResetLink( 39 | $request->only('email') 40 | ); 41 | 42 | return $status == Password::RESET_LINK_SENT 43 | ? back()->with('status', __($status)) 44 | : back()->withInput($request->only('email')) 45 | ->withErrors(['email' => __($status)]); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/RegisteredUserController.php: -------------------------------------------------------------------------------- 1 | count() >= 1) {//Only allow 1 user for this app 27 | return redirect('/login'); 28 | } 29 | return view('auth.register'); 30 | } 31 | 32 | /** 33 | * Handle an incoming registration request. 34 | * 35 | * @param \Illuminate\Http\Request $request 36 | * @return \Illuminate\Http\RedirectResponse 37 | * 38 | * @throws \Illuminate\Validation\ValidationException 39 | */ 40 | public function store(Request $request) 41 | { 42 | $request->validate([ 43 | 'name' => ['required', 'string', 'max:255'], 44 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 45 | 'password' => ['required', 'confirmed', Rules\Password::defaults()], 46 | ]); 47 | 48 | $user = User::create([ 49 | 'name' => $request->name, 50 | 'email' => $request->email, 51 | 'password' => Hash::make($request->password), 52 | 'api_token' => Str::random(60) 53 | ]); 54 | 55 | event(new Registered($user)); 56 | 57 | Auth::login($user); 58 | 59 | return redirect('/'); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ResetPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 39 | $this->middleware('signed')->only('verify'); 40 | $this->middleware('throttle:6,1')->only('verify', 'resend'); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/VerifyEmailController.php: -------------------------------------------------------------------------------- 1 | user()->hasVerifiedEmail()) { 21 | return redirect()->intended(RouteServiceProvider::HOME.'?verified=1'); 22 | } 23 | 24 | if ($request->user()->markEmailAsVerified()) { 25 | event(new Verified($request->user())); 26 | } 27 | 28 | return redirect()->intended(RouteServiceProvider::HOME.'?verified=1'); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | toArray(); 14 | return view('os.index', compact(['os'])); 15 | } 16 | 17 | public function create() 18 | { 19 | return view('os.create'); 20 | } 21 | 22 | public function store(Request $request) 23 | { 24 | $request->validate([ 25 | 'os_name' => 'required|string|min:2|max:255' 26 | ]); 27 | 28 | OS::create([ 29 | 'name' => $request->os_name 30 | ]); 31 | 32 | Cache::forget('operating_systems'); 33 | 34 | return redirect()->route('os.index') 35 | ->with('success', 'OS Created Successfully.'); 36 | } 37 | 38 | public function destroy(OS $o) 39 | { 40 | if ($o->delete()) { 41 | Cache::forget('operating_systems'); 42 | 43 | return redirect()->route('os.index') 44 | ->with('success', 'OS was deleted Successfully.'); 45 | } 46 | 47 | return redirect()->route('os.index') 48 | ->with('error', 'OS was not deleted.'); 49 | 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /app/Http/Controllers/PricingController.php: -------------------------------------------------------------------------------- 1 | validate([ 25 | 'provider_name' => 'required|string|min:2|max:255' 26 | ]); 27 | 28 | Providers::create([ 29 | 'name' => $request->provider_name 30 | ]); 31 | 32 | Cache::forget('providers'); 33 | 34 | return redirect()->route('providers.index') 35 | ->with('success', 'Provider Created Successfully.'); 36 | } 37 | 38 | public function show(Providers $provider) 39 | { 40 | $data = Providers::showServicesForProvider($provider->id); 41 | 42 | return view('providers.show', compact(['provider', 'data'])); 43 | } 44 | 45 | public function destroy(Providers $provider) 46 | { 47 | if ($provider->delete()) { 48 | Cache::forget('providers'); 49 | 50 | return redirect()->route('providers.index') 51 | ->with('success', 'Provider was deleted Successfully.'); 52 | } 53 | 54 | return redirect()->route('providers.index') 55 | ->with('error', 'Provider was not deleted.'); 56 | 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /app/Http/Controllers/YabsController.php: -------------------------------------------------------------------------------- 1 | Yabs::allYabs()]); 15 | } 16 | 17 | public function show(Yabs $yab) 18 | { 19 | return view('yabs.show', ['yabs' => Yabs::yabs($yab->id)]); 20 | } 21 | 22 | public function destroy(Yabs $yab) 23 | { 24 | if ($yab->delete()) { 25 | if (Server::serverYabsAmount($yab->server_id) === 0) { 26 | DB::table('servers') 27 | ->where('id', $yab->server_id) 28 | ->update(['has_yabs' => 0]); 29 | } 30 | 31 | Cache::forget('all_yabs'); 32 | Cache::forget("yabs.{$yab->id}"); 33 | 34 | return redirect()->route('yabs.index') 35 | ->with('success', 'YABS was deleted Successfully.'); 36 | } 37 | 38 | return redirect()->route('yabs.index') 39 | ->with('error', 'YABS was not deleted.'); 40 | } 41 | 42 | public function chooseYabsCompare() 43 | { 44 | $all_yabs = Yabs::allYabs(); 45 | 46 | if (isset($all_yabs[1])) { 47 | return view('yabs.choose-compare', compact('all_yabs')); 48 | } 49 | 50 | return redirect()->route('yabs.index') 51 | ->with('error', 'You need atleast 2 YABS to do a compare'); 52 | } 53 | 54 | public function compareYabs(string $yabs1, string $yabs2) 55 | { 56 | $yabs1_data = Yabs::yabs($yabs1); 57 | 58 | if (is_null($yabs1_data)) { 59 | abort(404); 60 | } 61 | 62 | $yabs2_data = Yabs::yabs($yabs2); 63 | 64 | if (is_null($yabs2_data)) { 65 | abort(404); 66 | } 67 | 68 | return view('yabs.compare', compact('yabs1_data', 'yabs2_data')); 69 | } 70 | 71 | public function yabsToJson(Yabs $yab): array 72 | { 73 | $all_yabs = Yabs::yabs($yab->id)[0]; 74 | return Yabs::buildYabsArray($all_yabs); 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /app/Http/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 18 | return route('login'); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | check()) { 26 | return redirect(RouteServiceProvider::HOME); 27 | } 28 | } 29 | 30 | return $next($request); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | allSubdomainsOfApplicationUrl(), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustProxies.php: -------------------------------------------------------------------------------- 1 | addMonth(1), function () { 25 | return DNS::count(); 26 | }); 27 | } 28 | 29 | public function note(): \Illuminate\Database\Eloquent\Relations\HasOne 30 | { 31 | return $this->hasOne(Note::class, 'service_id', 'id'); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /app/Models/DiskSpeed.php: -------------------------------------------------------------------------------- 1 | belongsTo(Yabs::class, 'id', 'id'); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Models/Labels.php: -------------------------------------------------------------------------------- 1 | delete(); 25 | } 26 | 27 | public static function deleteLabelAssignedAs($label_id): void 28 | { 29 | LabelsAssigned::where('label_id', $label_id)->delete(); 30 | } 31 | 32 | public static function insertLabelsAssigned(array $labels_array, string $service_id): void 33 | { 34 | for ($i = 1; $i <= 4; $i++) { 35 | if (!is_null($labels_array[($i - 1)])) { 36 | try { 37 | LabelsAssigned::create([ 38 | 'label_id' => $labels_array[($i - 1)], 39 | 'service_id' => $service_id 40 | ]); 41 | } catch (Exception $exception) { 42 | 43 | } 44 | } 45 | } 46 | } 47 | 48 | public static function labelsCount(): int 49 | { 50 | return Cache::remember('labels_count', now()->addMonth(1), function () { 51 | return Labels::count(); 52 | }); 53 | } 54 | 55 | public function assigned(): \Illuminate\Database\Eloquent\Relations\HasMany 56 | { 57 | return $this->hasMany(LabelsAssigned::class, 'label_id', 'id'); 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /app/Models/LabelsAssigned.php: -------------------------------------------------------------------------------- 1 | hasOne(Labels::class, 'id', 'label_id'); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /app/Models/Locations.php: -------------------------------------------------------------------------------- 1 | addMonth(1), function () { 22 | return self::orderBy('name')->get()->toArray(); 23 | }); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/Models/Misc.php: -------------------------------------------------------------------------------- 1 | orderBy($array[0], $array[1]); 31 | } 32 | }); 33 | } 34 | 35 | public static function allMisc() 36 | {//All misc and relationships (no using joins) 37 | return Cache::remember("all_misc", now()->addMonth(1), function () { 38 | $query = Misc::with(['price']); 39 | if (in_array(Session::get('sort_on'), [3, 4, 5, 6], true)) { 40 | $options = Settings::orderByProcess(Session::get('sort_on')); 41 | $query->orderBy(Pricing::select("pricings.$options[0]")->whereColumn("pricings.service_id", "misc_services.id"), $options[1]); 42 | } 43 | return $query->get(); 44 | }); 45 | } 46 | 47 | public static function misc(string $misc_id) 48 | {//Single misc and relationships (no using joins) 49 | return Cache::remember("misc.$misc_id", now()->addMonth(1), function () use ($misc_id) { 50 | return Misc::where('id', $misc_id) 51 | ->with(['price'])->first(); 52 | }); 53 | } 54 | 55 | public function price(): \Illuminate\Database\Eloquent\Relations\HasOne 56 | { 57 | return $this->hasOne(Pricing::class, 'service_id', 'id'); 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /app/Models/NetworkSpeed.php: -------------------------------------------------------------------------------- 1 | belongsTo(Yabs::class, 'id', 'id'); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Models/Note.php: -------------------------------------------------------------------------------- 1 | addMonth(1), function () use ($service_id) { 24 | return self::where('service_id', $service_id)->with(['server', 'shared', 'reseller', 'domain', 'dns', 'ip'])->first(); 25 | }); 26 | } 27 | 28 | public static function allNotes() 29 | { 30 | return Cache::remember("all_notes", now()->addMonth(1), function () { 31 | return self::with(['server', 'shared', 'reseller', 'domain', 'dns', 'ip'])->orderBy('created_at', 'desc')->get(); 32 | }); 33 | } 34 | 35 | public function server(): \Illuminate\Database\Eloquent\Relations\BelongsTo 36 | { 37 | return $this->belongsTo(Server::class, 'service_id', 'id'); 38 | } 39 | 40 | public function shared(): \Illuminate\Database\Eloquent\Relations\BelongsTo 41 | { 42 | return $this->belongsTo(Shared::class, 'service_id', 'id'); 43 | } 44 | 45 | public function reseller(): \Illuminate\Database\Eloquent\Relations\BelongsTo 46 | { 47 | return $this->belongsTo(Reseller::class, 'service_id', 'id'); 48 | } 49 | 50 | public function domain(): \Illuminate\Database\Eloquent\Relations\BelongsTo 51 | { 52 | return $this->belongsTo(Domains::class, 'service_id', 'id'); 53 | } 54 | 55 | public function dns(): \Illuminate\Database\Eloquent\Relations\BelongsTo 56 | { 57 | return $this->belongsTo(DNS::class, 'service_id', 'id'); 58 | } 59 | 60 | public function ip(): \Illuminate\Database\Eloquent\Relations\BelongsTo 61 | { 62 | return $this->belongsTo(IPs::class, 'service_id', 'id'); 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /app/Models/OS.php: -------------------------------------------------------------------------------- 1 | addMonth(1), function () { 22 | return self::orderBy('name')->get(); 23 | }); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/Models/Providers.php: -------------------------------------------------------------------------------- 1 | addMonth(1), function () { 23 | return self::orderBy('name')->get()->toArray(); 24 | }); 25 | } 26 | 27 | public static function showServicesForProvider($provider): array 28 | { 29 | $servers = DB::table('servers as s') 30 | ->where('s.provider_id', $provider) 31 | ->get(['s.id', 's.hostname']) 32 | ->toArray(); 33 | 34 | $shared = DB::table('shared_hosting as s') 35 | ->where('s.provider_id', $provider) 36 | ->get(['s.id', 's.main_domain as main_domain_shared']) 37 | ->toArray(); 38 | 39 | $reseller = DB::table('reseller_hosting as r') 40 | ->where('r.provider_id', $provider) 41 | ->get(['r.id', 'r.main_domain as main_domain_reseller']) 42 | ->toArray(); 43 | 44 | return array_merge($servers, $shared, $reseller); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/Models/User.php: -------------------------------------------------------------------------------- 1 | 'datetime', 43 | ]; 44 | } 45 | -------------------------------------------------------------------------------- /app/Process.php: -------------------------------------------------------------------------------- 1 | start_time = microtime(true); 13 | } 14 | 15 | public function stopTimer(): void 16 | { 17 | $this->end_time = microtime(true); 18 | } 19 | 20 | public function getTimeTaken(): float 21 | {//In seconds 22 | return ($this->end_time - $this->start_time) * 100; 23 | } 24 | 25 | public static function paymentTermIntToString(int $term): string 26 | { 27 | if ($term === 1) { 28 | return "p/m"; 29 | } elseif ($term === 2) { 30 | return "p/qtr"; 31 | } elseif ($term === 3) { 32 | return "p/hy"; 33 | } elseif ($term === 4) { 34 | return "p/y"; 35 | } elseif ($term === 5) { 36 | return "p/2y"; 37 | } elseif ($term === 6) { 38 | return "p/3y"; 39 | } else { 40 | return "unknown"; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 17 | ]; 18 | 19 | /** 20 | * Register any authentication / authorization services. 21 | * 22 | * @return void 23 | */ 24 | public function boot() 25 | { 26 | $this->registerPolicies(); 27 | 28 | // 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 19 | SendEmailVerificationNotification::class, 20 | ], 21 | ]; 22 | 23 | /** 24 | * Register any events for your application. 25 | * 26 | * @return void 27 | */ 28 | public function boot() 29 | { 30 | // 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | configureRateLimiting(); 42 | 43 | $this->routes(function () { 44 | Route::prefix('api') 45 | ->middleware('api') 46 | ->namespace($this->namespace) 47 | ->group(base_path('routes/api.php')); 48 | 49 | Route::middleware('web') 50 | ->namespace($this->namespace) 51 | ->group(base_path('routes/web.php')); 52 | }); 53 | } 54 | 55 | /** 56 | * Configure the rate limiters for the application. 57 | * 58 | * @return void 59 | */ 60 | protected function configureRateLimiting() 61 | { 62 | RateLimiter::for('api', function (Request $request) { 63 | return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip()); 64 | }); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /app/View/Components/AppLayout.php: -------------------------------------------------------------------------------- 1 | $all_labels 23 | ]); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/View/Components/LocationsSelect.php: -------------------------------------------------------------------------------- 1 | $all_locations 21 | ]); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/View/Components/OsSelect.php: -------------------------------------------------------------------------------- 1 | OS::allOS()->toArray() 15 | ]); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/View/Components/PricingSelect.php: -------------------------------------------------------------------------------- 1 | $all_providers 22 | ]); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/View/Components/TermSelect.php: -------------------------------------------------------------------------------- 1 | make(Illuminate\Contracts\Console\Kernel::class); 34 | 35 | $status = $kernel->handle( 36 | $input = new Symfony\Component\Console\Input\ArgvInput, 37 | new Symfony\Component\Console\Output\ConsoleOutput 38 | ); 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Shutdown The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once Artisan has finished running, we will fire off the shutdown events 46 | | so that any final work may be done by the application before we shut 47 | | down the process. This is the last thing to happen to the request. 48 | | 49 | */ 50 | 51 | $kernel->terminate($input, $status); 52 | 53 | exit($status); 54 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | Illuminate\Contracts\Http\Kernel::class, 31 | App\Http\Kernel::class 32 | ); 33 | 34 | $app->singleton( 35 | Illuminate\Contracts\Console\Kernel::class, 36 | App\Console\Kernel::class 37 | ); 38 | 39 | $app->singleton( 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, 41 | App\Exceptions\Handler::class 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "corbpie/myidlers", 3 | "type": "project", 4 | "description": "Web app for displaying, organizing and storing information about servers, shared/reseller hosting and domains.", 5 | "keywords": [ 6 | "myidlers", 7 | "crud", 8 | "vps", 9 | "organization" 10 | ], 11 | "license": "MIT", 12 | "require": { 13 | "php": "^8.3", 14 | "guzzlehttp/guzzle": "^7.9.2", 15 | "laravel/framework": "^v11.34.2", 16 | "laravel/tinker": "^v2.10.0", 17 | "laravel/ui": "^v4.6.0", 18 | "yajra/laravel-datatables-oracle": "~v11.1.5", 19 | "ext-json": "*", 20 | "illuminate/view": "^v11.6.0" 21 | }, 22 | "require-dev": { 23 | "fakerphp/faker": "^v1.24.1", 24 | "laravel/breeze": "^v2.2.6", 25 | "laravel/sail": "^v1.39.1", 26 | "mockery/mockery": "^1.6.12", 27 | "nunomaduro/collision": "^v8.5.0", 28 | "phpunit/phpunit": "^11.5.0", 29 | "spatie/laravel-ignition": "^2.9.0" 30 | }, 31 | "config": { 32 | "optimize-autoloader": true, 33 | "preferred-install": "dist", 34 | "sort-packages": true 35 | }, 36 | "extra": { 37 | "laravel": { 38 | "dont-discover": [] 39 | } 40 | }, 41 | "files": [ 42 | "app/Process.php" 43 | ], 44 | "autoload": { 45 | "psr-4": { 46 | "App\\": "app/", 47 | "Database\\Factories\\": "database/factories/", 48 | "Database\\Seeders\\": "database/seeders/" 49 | } 50 | }, 51 | "autoload-dev": { 52 | "psr-4": { 53 | "Tests\\": "tests/" 54 | } 55 | }, 56 | "minimum-stability": "dev", 57 | "prefer-stable": true, 58 | "scripts": { 59 | "post-autoload-dump": [ 60 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 61 | "@php artisan package:discover --ansi" 62 | ], 63 | "post-root-package-install": [ 64 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 65 | ], 66 | "post-create-project-cmd": [ 67 | "@php artisan key:generate --ansi" 68 | ] 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'null'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Broadcast Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the broadcast connections that will be used 26 | | to broadcast events to other systems or over websockets. Samples of 27 | | each available type of connection are provided inside this array. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'pusher' => [ 34 | 'driver' => 'pusher', 35 | 'key' => env('PUSHER_APP_KEY'), 36 | 'secret' => env('PUSHER_APP_SECRET'), 37 | 'app_id' => env('PUSHER_APP_ID'), 38 | 'options' => [ 39 | 'cluster' => env('PUSHER_APP_CLUSTER'), 40 | 'useTLS' => true, 41 | ], 42 | ], 43 | 44 | 'ably' => [ 45 | 'driver' => 'ably', 46 | 'key' => env('ABLY_KEY'), 47 | ], 48 | 49 | 'redis' => [ 50 | 'driver' => 'redis', 51 | 'connection' => 'default', 52 | ], 53 | 54 | 'log' => [ 55 | 'driver' => 'log', 56 | ], 57 | 58 | 'null' => [ 59 | 'driver' => 'null', 60 | ], 61 | 62 | ], 63 | 64 | ]; 65 | -------------------------------------------------------------------------------- /config/cors.php: -------------------------------------------------------------------------------- 1 | ['api/*', 'sanctum/csrf-cookie'], 19 | 20 | 'allowed_methods' => ['*'], 21 | 22 | 'allowed_origins' => ['*'], 23 | 24 | 'allowed_origins_patterns' => [], 25 | 26 | 'allowed_headers' => ['*'], 27 | 28 | 'exposed_headers' => [], 29 | 30 | 'max_age' => 0, 31 | 32 | 'supports_credentials' => false, 33 | 34 | ]; 35 | -------------------------------------------------------------------------------- /config/custom.php: -------------------------------------------------------------------------------- 1 | 'bcrypt', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Bcrypt Options 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may specify the configuration options that should be used when 26 | | passwords are hashed using the Bcrypt algorithm. This will allow you 27 | | to control the amount of time it takes to hash the given password. 28 | | 29 | */ 30 | 31 | 'bcrypt' => [ 32 | 'rounds' => env('BCRYPT_ROUNDS', 10), 33 | ], 34 | 35 | /* 36 | |-------------------------------------------------------------------------- 37 | | Argon Options 38 | |-------------------------------------------------------------------------- 39 | | 40 | | Here you may specify the configuration options that should be used when 41 | | passwords are hashed using the Argon algorithm. These will allow you 42 | | to control the amount of time it takes to hash the given password. 43 | | 44 | */ 45 | 46 | 'argon' => [ 47 | 'memory' => 1024, 48 | 'threads' => 2, 49 | 'time' => 2, 50 | ], 51 | 52 | ]; 53 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), 21 | ], 22 | 23 | 'postmark' => [ 24 | 'token' => env('POSTMARK_TOKEN'), 25 | ], 26 | 27 | 'ses' => [ 28 | 'key' => env('AWS_ACCESS_KEY_ID'), 29 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 30 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 31 | ], 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | resource_path('views'), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => env( 32 | 'VIEW_COMPILED_PATH', 33 | realpath(storage_path('framework/views')) 34 | ), 35 | 36 | ]; 37 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | *.sqlite-journal 3 | -------------------------------------------------------------------------------- /database/factories/DNSFactory.php: -------------------------------------------------------------------------------- 1 | $this->faker->unique()->bothify('???#??#?'), 13 | 'dns_type' => $this->faker->shuffleArray(['A', 'AAA']), 14 | 'value1' => $this->faker->shuffleArray(['dev', 'blog', 'panel']), 15 | 'value2' => $this->faker->ipv4 16 | ]; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /database/factories/DomainsFactory.php: -------------------------------------------------------------------------------- 1 | $this->faker->unique()->bothify('???#??#?'), 13 | 'domain' => $this->faker->domainWord, 14 | 'extension' => 'com', 15 | 'ns1' => null, 16 | 'ns2' => null, 17 | 'ns3' => null, 18 | 'provider_id' => $this->faker->numberBetween(1, 27), 19 | 'label' => null, 20 | 'price' => 9.99, 21 | 'currency' => 'USD', 22 | 'payment_term' => 4, 23 | 'owned_since' => $this->faker->dateTimeThisDecade, 24 | 'next_due_date' => date('Y-m-d',strtotime('+130 days',strtotime(str_replace('/', '-', date("Y-m-d"))))) 25 | ]; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /database/factories/ServerFactory.php: -------------------------------------------------------------------------------- 1 | faker->numberBetween(512, 4086); 16 | $disk = $this->faker->numberBetween(5, 120); 17 | return [ 18 | 'id' => $this->faker->unique()->bothify('???#??#?'), 19 | 'hostname' => $this->faker->domainName, 20 | 'ipv4' => $this->faker->ipv4, 21 | 'ipv6' => $this->faker->ipv6, 22 | 'server_type' => $this->faker->numberBetween(1, 4), 23 | 'ns1' => null, 24 | 'ns2' => null, 25 | 'os_id' => $this->faker->numberBetween(1, 27), 26 | 'provider_id' => $this->faker->numberBetween(1, 27), 27 | 'location_id' => $this->faker->numberBetween(1, 28), 28 | 'label' => null, 29 | //'price' => $this->faker->randomFloat(2, 2.50, 30.00), 30 | //'currency' => 'USD', 31 | //'payment_term' => 1, 32 | 'ram' => $ram, 33 | 'ram_as_mb' => $ram, 34 | 'disk' => $disk, 35 | 'disk_as_gb' => $disk, 36 | 'bandwidth' => $this->faker->numberBetween(100, 999), 37 | 'owned_since' => $this->faker->dateTimeThisDecade, 38 | //'next_due_date' => date('Y-m-d',strtotime('+30 days',strtotime(str_replace('/', '-', date("Y-m-d"))))) 39 | ]; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | $this->faker->name, 17 | 'email' => 'ludwig22@example.org', 18 | //'email' => $this->faker->unique()->safeEmail, 19 | 'email_verified_at' => now(), 20 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 21 | 'api_token' => Str::random(60), 22 | 'remember_token' => Str::random(10) 23 | ]; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name'); 19 | $table->string('email')->unique(); 20 | $table->timestamp('email_verified_at')->nullable(); 21 | $table->string('password'); 22 | $table->string('api_token', 60); 23 | $table->rememberToken(); 24 | $table->timestamps(); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::dropIfExists('users'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 18 | $table->string('token'); 19 | $table->timestamp('created_at')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('password_resets'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2021_02_10_122904_create_servers_table.php: -------------------------------------------------------------------------------- 1 | char('id', 8)->primary()->default(null); 18 | $table->tinyInteger('active')->default(1); 19 | $table->tinyInteger('show_public')->default(0); 20 | $table->string('hostname'); 21 | $table->string('ns1')->nullable()->default(null); 22 | $table->string('ns2')->nullable()->default(null); 23 | $table->tinyInteger('server_type')->default(1); 24 | $table->unsignedBigInteger('os_id')->default(0); 25 | $table->unsignedBigInteger('provider_id')->default(9999); 26 | $table->unsignedBigInteger('location_id')->default(9999); 27 | $table->integer('ssh')->nullable()->default(22); 28 | $table->integer('bandwidth')->nullable(); 29 | $table->integer('ram')->default(1024); 30 | $table->char('ram_type',2)->default('MB'); 31 | $table->integer('ram_as_mb')->default(0); 32 | $table->integer('disk')->default(10); 33 | $table->char('disk_type',2)->default('GB'); 34 | $table->integer('disk_as_gb')->default(0); 35 | $table->integer('cpu')->default(1); 36 | $table->tinyInteger('has_yabs')->default(0); 37 | $table->tinyInteger('was_promo')->default(0); 38 | $table->date('owned_since')->nullable(); 39 | $table->timestamps(); 40 | }); 41 | } 42 | 43 | /** 44 | * Reverse the migrations. 45 | * 46 | * @return void 47 | */ 48 | public function down() 49 | { 50 | Schema::dropIfExists('servers'); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /database/migrations/2022_01_30_112059_create_providers_table.php: -------------------------------------------------------------------------------- 1 | id()->autoIncrement(); 18 | $table->string('name')->unique(); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('providers'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2022_01_30_112350_create_locations_table.php: -------------------------------------------------------------------------------- 1 | id()->autoIncrement(); 18 | $table->string('name')->unique(); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | // 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2022_02_01_031629_create_os_table.php: -------------------------------------------------------------------------------- 1 | id()->autoIncrement(); 18 | $table->string('name')->unique(); 19 | $table->timestamps(); 20 | }); 21 | 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::dropIfExists('os'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /database/migrations/2022_02_01_233932_create_domains_table.php: -------------------------------------------------------------------------------- 1 | char('id', 8)->primary()->default(null); 18 | $table->string('domain'); 19 | $table->tinyInteger('active')->default(1); 20 | $table->string('extension'); 21 | $table->string('ns1')->nullable(); 22 | $table->string('ns2')->nullable(); 23 | $table->string('ns3')->nullable(); 24 | $table->unsignedBigInteger('provider_id')->default(9999); 25 | $table->date('owned_since')->nullable(); 26 | $table->timestamps(); 27 | }); 28 | } 29 | 30 | /** 31 | * Reverse the migrations. 32 | * 33 | * @return void 34 | */ 35 | public function down() 36 | { 37 | Schema::dropIfExists('domains'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /database/migrations/2022_02_02_005352_create_d_n_s_table.php: -------------------------------------------------------------------------------- 1 | char('id', 8)->primary()->autoIncrement(); 18 | $table->char('server_id', 8)->nullable(); 19 | $table->char('domain_id', 8)->nullable(); 20 | $table->char('shared_id', 8)->nullable(); 21 | $table->char('reseller_id', 8)->nullable(); 22 | $table->string('dns_type'); 23 | $table->string('hostname'); 24 | $table->string('address'); 25 | $table->timestamps(); 26 | }); 27 | } 28 | 29 | /** 30 | * Reverse the migrations. 31 | * 32 | * @return void 33 | */ 34 | public function down() 35 | { 36 | Schema::dropIfExists('d_n_s'); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /database/migrations/2022_02_03_035702_create_labels_table.php: -------------------------------------------------------------------------------- 1 | char('id', 8)->primary()->default(null); 18 | $table->string('label')->unique(); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('labels'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2022_02_03_040140_create_shareds_table.php: -------------------------------------------------------------------------------- 1 | char('id', 8)->primary(); 18 | $table->tinyInteger('active')->default(1); 19 | $table->string('main_domain'); 20 | $table->string('shared_type')->nullable(); 21 | $table->unsignedBigInteger('provider_id')->default(9999); 22 | $table->unsignedBigInteger('location_id')->default(9999); 23 | $table->integer('bandwidth')->nullable(); 24 | $table->integer('disk')->default(10); 25 | $table->char('disk_type', 2)->default('GB'); 26 | $table->integer('disk_as_gb')->nullable()->default(0); 27 | $table->integer('domains_limit')->nullable()->default(1); 28 | $table->integer('subdomains_limit')->nullable()->default(1); 29 | $table->integer('ftp_limit')->nullable()->default(1); 30 | $table->integer('email_limit')->nullable()->default(1); 31 | $table->integer('db_limit')->nullable()->default(1); 32 | $table->tinyInteger('was_promo')->default(0); 33 | $table->date('owned_since')->nullable(); 34 | $table->timestamps(); 35 | }); 36 | } 37 | 38 | /** 39 | * Reverse the migrations. 40 | * 41 | * @return void 42 | */ 43 | public function down() 44 | { 45 | Schema::dropIfExists('shared_hosting'); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /database/migrations/2022_02_03_040152_create_resellers_table.php: -------------------------------------------------------------------------------- 1 | char('id', 8)->primary(); 18 | $table->tinyInteger('active')->default(1); 19 | $table->string('main_domain'); 20 | $table->integer('accounts')->default(1); 21 | $table->string('reseller_type')->nullable(); 22 | $table->unsignedBigInteger('provider_id')->default(9999); 23 | $table->unsignedBigInteger('location_id')->default(9999); 24 | $table->integer('bandwidth')->nullable(); 25 | $table->integer('disk')->default(10); 26 | $table->char('disk_type', 2)->default('GB'); 27 | $table->integer('disk_as_gb')->nullable()->default(0); 28 | $table->integer('domains_limit')->nullable()->default(1); 29 | $table->integer('subdomains_limit')->nullable()->default(1); 30 | $table->integer('ftp_limit')->nullable()->default(1); 31 | $table->integer('email_limit')->nullable()->default(1); 32 | $table->integer('db_limit')->nullable()->default(1); 33 | $table->tinyInteger('was_promo')->default(0); 34 | $table->date('owned_since')->nullable(); 35 | $table->timestamps(); 36 | }); 37 | } 38 | 39 | /** 40 | * Reverse the migrations. 41 | * 42 | * @return void 43 | */ 44 | public function down() 45 | { 46 | Schema::dropIfExists('reseller_hosting'); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /database/migrations/2022_02_05_104355_create_yabs_table.php: -------------------------------------------------------------------------------- 1 | char('id', 8)->primary(); 17 | $table->char('server_id', 8); 18 | $table->boolean('has_ipv6')->default(false); 19 | $table->boolean('aes')->default(false); 20 | $table->boolean('vm')->default(false); 21 | $table->dateTime('output_date'); 22 | $table->tinyInteger('cpu_cores'); 23 | $table->float('cpu_freq'); 24 | $table->string('cpu_model'); 25 | $table->float('ram'); 26 | $table->char('ram_type', 2); 27 | $table->float('ram_mb'); 28 | $table->float('disk'); 29 | $table->char('disk_type', 2); 30 | $table->float('disk_gb'); 31 | $table->integer('gb5_single'); 32 | $table->integer('gb5_multi'); 33 | $table->integer('gb5_id'); 34 | $table->timestamps(); 35 | $table->unique(['id','server_id'], 'yabs_u1'); 36 | }); 37 | } 38 | 39 | /** 40 | * Reverse the migrations. 41 | * 42 | * @return void 43 | */ 44 | public function down() 45 | { 46 | Schema::dropIfExists('yabs'); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /database/migrations/2022_02_05_104551_create_disk_speed_table.php: -------------------------------------------------------------------------------- 1 | char('id', 8)->primary(); 16 | $table->char('server_id',8); 17 | $table->float('d_4k'); 18 | $table->char('d_4k_type',4); 19 | $table->float('d_4k_as_mbps'); 20 | $table->float('d_64k'); 21 | $table->char('d_64k_type',4); 22 | $table->float('d_64k_as_mbps'); 23 | $table->float('d_512k'); 24 | $table->char('d_512k_type',4); 25 | $table->float('d_512k_as_mbps'); 26 | $table->float('d_1m'); 27 | $table->char('d_1m_type',4); 28 | $table->float('d_1m_as_mbps'); 29 | $table->timestamps(); 30 | }); 31 | } 32 | 33 | /** 34 | * Reverse the migrations. 35 | * 36 | * @return void 37 | */ 38 | public function down() 39 | { 40 | Schema::dropIfExists('disk_speed'); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /database/migrations/2022_02_05_104919_create_network_speed_table.php: -------------------------------------------------------------------------------- 1 | char('id', 8); 16 | $table->char('server_id', 8); 17 | $table->string('location'); 18 | $table->float('send'); 19 | $table->char('send_type', 4); 20 | $table->float('send_as_mbps'); 21 | $table->float('receive'); 22 | $table->char('receive_type', 4); 23 | $table->float('receive_as_mbps'); 24 | $table->timestamps(); 25 | $table->unique(['id','server_id', 'location'], 'network_speed_u1'); 26 | }); 27 | } 28 | 29 | /** 30 | * Reverse the migrations. 31 | * 32 | * @return void 33 | */ 34 | public function down() 35 | { 36 | Schema::dropIfExists('network_speed'); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /database/migrations/2022_02_05_105219_create_pricing_table.php: -------------------------------------------------------------------------------- 1 | id()->autoIncrement(); 17 | $table->char('service_id', 8)->unique(); 18 | $table->tinyInteger('service_type'); 19 | $table->tinyInteger('active')->default(1); 20 | $table->char('currency', 3); 21 | $table->decimal('price', 10, 2); 22 | $table->tinyInteger('term'); 23 | $table->decimal('as_usd', 10, 2); 24 | $table->decimal('usd_per_month', 10, 2); 25 | $table->date('next_due_date'); 26 | $table->timestamps(); 27 | }); 28 | } 29 | 30 | /** 31 | * Reverse the migrations. 32 | * 33 | * @return void 34 | */ 35 | public function down() 36 | { 37 | Schema::dropIfExists('pricings'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /database/migrations/2022_02_08_010323_create_labels_assigned_table.php: -------------------------------------------------------------------------------- 1 | char('label_id', 8); 18 | $table->char('service_id', 8); 19 | $table->unique(['label_id','service_id'], 'labels_assigned_u1'); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('labels_assigned'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2022_02_09_032438_create_settings_table.php: -------------------------------------------------------------------------------- 1 | integer('id')->default(1)->primary(); 18 | $table->boolean('show_versions_footer')->default(true); 19 | $table->boolean('show_servers_public')->default(false); 20 | $table->boolean('show_server_value_ip')->default(false); 21 | $table->boolean('show_server_value_hostname')->default(false); 22 | $table->boolean('show_server_value_provider')->default(true); 23 | $table->boolean('show_server_value_location')->default(true); 24 | $table->boolean('show_server_value_price')->default(true); 25 | $table->boolean('show_server_value_yabs')->default(true); 26 | $table->timestamps(); 27 | }); 28 | } 29 | 30 | /** 31 | * Reverse the migrations. 32 | * 33 | * @return void 34 | */ 35 | public function down() 36 | { 37 | Schema::dropIfExists('settings'); 38 | } 39 | }; 40 | -------------------------------------------------------------------------------- /database/migrations/2022_02_11_022150_create_miscs_table.php: -------------------------------------------------------------------------------- 1 | char('id', 8)->primary(); 18 | $table->string('name'); 19 | $table->tinyInteger('active')->default(1); 20 | $table->date('owned_since')->nullable(); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::dropIfExists('misc_services'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /database/migrations/2022_02_21_001233_create_ips_table.php: -------------------------------------------------------------------------------- 1 | char('id', 8)->primary(); 13 | $table->char('service_id', 8); 14 | $table->string('address'); 15 | $table->tinyInteger('is_ipv4')->default(1); 16 | $table->tinyInteger('active')->default(1); 17 | $table->timestamps(); 18 | $table->unique(['service_id','address'], 'ips_u1'); 19 | }); 20 | } 21 | 22 | public function down() 23 | { 24 | Schema::dropIfExists('ips'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /database/migrations/2022_03_05_125635_add_cols_to_settings.php: -------------------------------------------------------------------------------- 1 | string('default_currency')->default('USD'); 18 | $table->integer('default_server_os')->default(20); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | * 25 | * @return void 26 | */ 27 | public function down() 28 | { 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /database/migrations/2022_03_09_022939_add_homepage_amount_cols_to_settings.php: -------------------------------------------------------------------------------- 1 | integer('due_soon_amount')->default(6); 18 | $table->integer('recently_added_amount')->default(6); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | * 25 | * @return void 26 | */ 27 | public function down() 28 | { 29 | Schema::table('settings', function (Blueprint $table) { 30 | // 31 | }); 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /database/migrations/2022_05_09_154509_add_dark_mode_setting.php: -------------------------------------------------------------------------------- 1 | boolean('dark_mode')->default(false); 13 | }); 14 | } 15 | 16 | public function down() 17 | { 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /database/migrations/2022_05_15_105254_create_seedboxes_table.php: -------------------------------------------------------------------------------- 1 | char('id', 8)->primary(); 18 | $table->tinyInteger('active')->default(1); 19 | $table->string('title'); 20 | $table->string('hostname')->nullable(); 21 | $table->string('seed_box_type')->nullable(); 22 | $table->unsignedBigInteger('provider_id')->default(9999); 23 | $table->unsignedBigInteger('location_id')->default(9999); 24 | $table->integer('bandwidth')->nullable(); 25 | $table->integer('port_speed')->nullable(); 26 | $table->integer('disk')->default(10); 27 | $table->char('disk_type', 2)->default('GB'); 28 | $table->integer('disk_as_gb')->nullable()->default(0); 29 | $table->tinyInteger('was_promo')->default(0); 30 | $table->date('owned_since')->nullable(); 31 | $table->timestamps(); 32 | }); 33 | } 34 | 35 | /** 36 | * Reverse the migrations. 37 | * 38 | * @return void 39 | */ 40 | public function down() 41 | { 42 | Schema::dropIfExists('seedboxes'); 43 | } 44 | }; 45 | -------------------------------------------------------------------------------- /database/migrations/2022_05_29_105255_add_dash_currency_setting.php: -------------------------------------------------------------------------------- 1 | char('dashboard_currency', 3)->default('USD'); 13 | }); 14 | } 15 | 16 | public function down() 17 | { 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /database/migrations/2022_06_24_010658_alter_yabs_foreign_key.php: -------------------------------------------------------------------------------- 1 | dropForeign('ds_fk_yabs'); 15 | } 16 | 17 | $table->foreign('id', 'ds_fk_yabs')->references('id')->on('yabs')->onDelete('cascade'); 18 | }); 19 | 20 | Schema::table('network_speed', function (Blueprint $table) { 21 | if (env('DB_CONNECTION') !== 'sqlite') { 22 | $table->dropForeign('ns_fk_yabs'); 23 | } 24 | 25 | $table->foreign('id', 'ns_fk_yabs')->references('id')->on('yabs')->onDelete('cascade'); 26 | }); 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /database/migrations/2022_06_24_023931_alter_yabs_foreign_key_delete.php: -------------------------------------------------------------------------------- 1 | dropForeign('yabs_fk_servers'); 13 | } 14 | 15 | $table->foreign('server_id', 'yabs_fk_servers')->references('id')->on('servers')->onDelete('cascade'); 16 | }); 17 | } 18 | }; 19 | -------------------------------------------------------------------------------- /database/migrations/2022_07_20_011250_add_columns_to_yabs_table.php: -------------------------------------------------------------------------------- 1 | string('uptime')->nullable()->default(null)->after('gb5_id'); 12 | $table->string('distro')->nullable()->default(null)->after('gb5_id'); 13 | $table->string('kernel')->nullable()->default(null)->after('gb5_id'); 14 | $table->float('swap')->nullable()->default(null)->after('ram_mb'); 15 | $table->char('swap_type', 2)->nullable()->default(null)->after('ram_mb'); 16 | $table->float('swap_mb')->nullable()->default(null)->after('ram_mb'); 17 | }); 18 | } 19 | 20 | public function down() 21 | { 22 | Schema::table('yabs', function (Blueprint $table) { 23 | $table->dropColumn(['uptime', 'distro', 'kernel', 'swap', 'swap_type', 'swap_mb']); 24 | }); 25 | } 26 | }; 27 | -------------------------------------------------------------------------------- /database/migrations/2022_07_20_015804_add_column_to_settings_table.php: -------------------------------------------------------------------------------- 1 | boolean('save_yabs_as_txt')->default(false)->after('show_server_value_yabs'); 13 | }); 14 | } 15 | 16 | public function down() 17 | { 18 | Schema::table('settings', function (Blueprint $table) { 19 | $table->dropColumn('save_yabs_as_txt'); 20 | }); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /database/migrations/2022_09_22_020501_update_yabs_table.php: -------------------------------------------------------------------------------- 1 | integer('gb5_single')->nullable()->change(); 14 | $table->integer('gb5_multi')->nullable()->change(); 15 | $table->integer('gb5_id')->nullable()->change(); 16 | }); 17 | } 18 | }; 19 | -------------------------------------------------------------------------------- /database/migrations/2022_10_04_002543_add_sort_on_to_settings_table.php: -------------------------------------------------------------------------------- 1 | tinyInteger('sort_on')->default(1)->after('dashboard_currency'); 13 | }); 14 | } 15 | 16 | public function down() 17 | { 18 | Schema::table('settings', function (Blueprint $table) { 19 | $table->dropColumn('sort_on'); 20 | }); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /database/migrations/2022_12_02_000007_create_notes_table.php: -------------------------------------------------------------------------------- 1 | char('id', 8)->primary(); 13 | $table->char('service_id', 8)->unique(); 14 | $table->text('note'); 15 | $table->timestamps(); 16 | }); 17 | } 18 | 19 | public function down() 20 | { 21 | Schema::dropIfExists('notes'); 22 | } 23 | }; 24 | -------------------------------------------------------------------------------- /database/migrations/2023_03_31_001352_add_favicon_to_settings_table.php: -------------------------------------------------------------------------------- 1 | string('favicon')->after('sort_on')->default('favicon.ico'); 13 | }); 14 | } 15 | 16 | public function down(): void 17 | { 18 | Schema::table('settings', function (Blueprint $table) { 19 | $table->dropColumn('favicon'); 20 | }); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /database/migrations/2023_09_20_121309_add_gb6_to_yabs_table.php: -------------------------------------------------------------------------------- 1 | integer('gb6_single')->nullable()->default(null)->after('gb5_id'); 12 | $table->integer('gb6_multi')->nullable()->default(null)->after('gb5_id'); 13 | $table->integer('gb6_id')->nullable()->default(null)->after('gb5_id'); 14 | }); 15 | } 16 | 17 | public function down(): void 18 | { 19 | Schema::table('yabs', function (Blueprint $table) { 20 | $table->dropColumn('gb6_single'); 21 | $table->dropColumn('gb6_multi'); 22 | $table->dropColumn('gb6_id'); 23 | }); 24 | } 25 | }; 26 | -------------------------------------------------------------------------------- /database/migrations/2024_12_09_055453_add_whois_columns_to_ips_table.php: -------------------------------------------------------------------------------- 1 | string('continent')->default(null)->nullable()->after('active'); 12 | $table->string('country')->default(null)->nullable()->after('active'); 13 | $table->string('region')->default(null)->nullable()->after('active'); 14 | $table->string('city')->default(null)->nullable()->after('active'); 15 | $table->string('org')->default(null)->nullable()->after('active'); 16 | $table->string('isp')->default(null)->nullable()->after('active'); 17 | $table->string('asn')->default(null)->nullable()->after('active'); 18 | $table->string('timezone_gmt')->default(null)->nullable()->after('active'); 19 | $table->dateTime('fetched_at')->default(null)->nullable()->after('active'); 20 | }); 21 | } 22 | 23 | public function down(): void 24 | { 25 | Schema::table('ips', function (Blueprint $table) { 26 | $table->dropColumn(['continent', 'country', 'region', 'city', 'org', 'isp', 'asn', 'timezone_gmt', 'fetched_at']); 27 | }); 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /database/seeders/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | create();//Disable demo first user creation 12 | $this->call(SettingsSeeder::class); 13 | $this->call(ProvidersSeeder::class); 14 | $this->call(LocationsSeeder::class); 15 | $this->call(OsSeeder::class); 16 | $this->call(LabelsSeeder::class); 17 | //$this->call(DomainsSeeder::class); 18 | //$this->call(ServersSeeder::class); 19 | //$this->call(SharedSeeder::class); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /database/seeders/DomainsSeeder.php: -------------------------------------------------------------------------------- 1 | $id1, 20 | "domain" => "node", 21 | "extension" => "ai", 22 | "provider_id" => 59, 23 | "owned_since" => '2013-01-12', 24 | "created_at" => Carbon::now() 25 | ], 26 | [ 27 | "id" => $id2, 28 | "domain" => "cpu", 29 | "extension" => "club", 30 | "provider_id" => 59, 31 | "owned_since" => '2016-04-25', 32 | "created_at" => Carbon::now() 33 | ] 34 | ]; 35 | 36 | DB::table('domains')->insert($domains); 37 | 38 | $pricing = [ 39 | [ 40 | "service_id" => $id1, 41 | "service_type" => 4, 42 | "currency" => "USD", 43 | "price" => 9.99, 44 | "term" => 4, 45 | "as_usd" => 9.99, 46 | "usd_per_month" => 0.83, 47 | "next_due_date" => Carbon::now()->addDays(30)->format('Y-m-d'), 48 | "created_at" => Carbon::now() 49 | ], 50 | [ 51 | "service_id" => $id2, 52 | "service_type" => 4, 53 | "currency" => "USD", 54 | "price" => 9.99, 55 | "term" => 4, 56 | "as_usd" => 9.99, 57 | "usd_per_month" => 0.83, 58 | "next_due_date" => Carbon::now()->addDays(30)->format('Y-m-d'), 59 | "created_at" => Carbon::now() 60 | ], 61 | ]; 62 | 63 | DB::table('pricings')->insert($pricing); 64 | 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /database/seeders/SettingsSeeder.php: -------------------------------------------------------------------------------- 1 | 1, 16 | "show_servers_public" => 0, 17 | "show_server_value_ip" => 0, 18 | "show_server_value_hostname" => 0, 19 | "show_server_value_provider" => 1, 20 | "show_server_value_location" => 1, 21 | "show_server_value_price" => 1, 22 | "show_server_value_yabs" => 1, 23 | "created_at" => Carbon::now() 24 | ] 25 | ]; 26 | 27 | DB::table('settings')->insert($settings); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /database/seeders/SharedSeeder.php: -------------------------------------------------------------------------------- 1 | $id, 20 | "active" => 1, 21 | "main_domain" => "node.ai", 22 | "shared_type" => "Direct Admin", 23 | "bandwidth" => 3000, 24 | "disk" => 45, 25 | "disk_type" => 'GB', 26 | "disk_as_gb" => 45, 27 | "domains_limit" => 10, 28 | "subdomains_limit" => 10, 29 | "ftp_limit" => 5, 30 | "email_limit" => 5, 31 | "db_limit" => 2, 32 | "provider_id" => 90, 33 | "location_id" => 71, 34 | "owned_since" => Carbon::now()->subDays(220), 35 | "created_at" => Carbon::now(), 36 | "updated_at" => Carbon::now(), 37 | ] 38 | ]; 39 | 40 | DB::table('shared_hosting')->insert($shared); 41 | 42 | $pricing = [ 43 | [ 44 | "service_id" => $id, 45 | "active" => 1, 46 | "service_type" => 2, 47 | "currency" => "USD", 48 | "price" => 60.00, 49 | "term" => 4, 50 | "as_usd" => 60.00, 51 | "usd_per_month" => 5.00, 52 | "next_due_date" => Carbon::now()->addDays(12)->format('Y-m-d'), 53 | "created_at" => Carbon::now(), 54 | "updated_at" => Carbon::now(), 55 | ] 56 | ]; 57 | 58 | DB::table('pricings')->insert($pricing); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "npm run development", 5 | "development": "mix", 6 | "watch": "mix watch", 7 | "watch-poll": "mix watch -- --watch-options-poll=1000", 8 | "hot": "mix watch --hot", 9 | "prod": "npm run production", 10 | "production": "mix --production", 11 | "build": "webpack --config webpack.config.js" 12 | }, 13 | "devDependencies": { 14 | "axios": "^1.7.9", 15 | "bootstrap": "^5.3.3", 16 | "bootstrap-dark-5": "^1.1.3", 17 | "bootstrap-data-table": "^1.0.0", 18 | "datatables": "^1.10.18", 19 | "datatables.net-bs": "^2.1.8", 20 | "font-awesome": "^4.7.0", 21 | "jquery": "^3.7.1", 22 | "laravel-mix": "^6.0.49", 23 | "resolve-url-loader": "^5.0.0", 24 | "sass": "^1.82.0", 25 | "sass-loader": "^12.6.0", 26 | "vue": "^2.7.16", 27 | "vue-loader": "^17.4.2", 28 | "vue-resource": "^1.5.3", 29 | "vue-template-compiler": "^2.7.16" 30 | }, 31 | "dependencies": { 32 | "@fortawesome/fontawesome-free": "^6.7.1", 33 | "datatables.net-bs5": "^1.13.11" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | ./tests/Unit 10 | 11 | 12 | ./tests/Feature 13 | 14 | 15 | 16 | 17 | ./app 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Send Requests To Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /public/My Idlers logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cp6/my-idlers/525b1d29f0472bc75821d2b8eb0b30cd2201bdac/public/My Idlers logo.jpg -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cp6/my-idlers/525b1d29f0472bc75821d2b8eb0b30cd2201bdac/public/favicon.ico -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class); 50 | 51 | $response = tap($kernel->handle( 52 | $request = Request::capture() 53 | ))->send(); 54 | 55 | $kernel->terminate($request, $response); 56 | -------------------------------------------------------------------------------- /public/js/app.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v5.3.3 (https://getbootstrap.com/) 3 | * Copyright 2011-2024 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 5 | */ 6 | 7 | /*! 8 | * The buffer module from node.js, for the browser. 9 | * 10 | * @author Feross Aboukhadijeh 11 | * @license MIT 12 | */ 13 | 14 | /*! 15 | * Vue.js v2.7.16 16 | * (c) 2014-2023 Evan You 17 | * Released under the MIT License. 18 | */ 19 | 20 | /*! 21 | * jQuery JavaScript Library v3.7.1 22 | * https://jquery.com/ 23 | * 24 | * Copyright OpenJS Foundation and other contributors 25 | * Released under the MIT license 26 | * https://jquery.org/license 27 | * 28 | * Date: 2023-08-28T13:37Z 29 | */ 30 | 31 | /*! DataTables 1.10.18 32 | * ©2008-2018 SpryMedia Ltd - datatables.net/license 33 | */ 34 | 35 | /*! DataTables Bootstrap 5 integration 36 | * 2020 SpryMedia Ltd - datatables.net/license 37 | */ 38 | 39 | /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ 40 | -------------------------------------------------------------------------------- /public/mix-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "/js/app.js": "/js/app.js", 3 | "/css/app.css": "/css/app.css", 4 | "/css/dark.css": "/css/dark.css", 5 | "/css/light.css": "/css/light.css", 6 | "/webfonts/fa-regular-400.ttf": "/webfonts/fa-regular-400.ttf", 7 | "/webfonts/fa-regular-400.woff2": "/webfonts/fa-regular-400.woff2", 8 | "/webfonts/fa-solid-900.ttf": "/webfonts/fa-solid-900.ttf", 9 | "/webfonts/fa-solid-900.woff2": "/webfonts/fa-solid-900.woff2", 10 | "/webfonts/fa-brands-400.ttf": "/webfonts/fa-brands-400.ttf" 11 | } 12 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /public/web.config: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /public/webfonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cp6/my-idlers/525b1d29f0472bc75821d2b8eb0b30cd2201bdac/public/webfonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /public/webfonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cp6/my-idlers/525b1d29f0472bc75821d2b8eb0b30cd2201bdac/public/webfonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /public/webfonts/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cp6/my-idlers/525b1d29f0472bc75821d2b8eb0b30cd2201bdac/public/webfonts/fa-regular-400.ttf -------------------------------------------------------------------------------- /public/webfonts/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cp6/my-idlers/525b1d29f0472bc75821d2b8eb0b30cd2201bdac/public/webfonts/fa-regular-400.woff2 -------------------------------------------------------------------------------- /public/webfonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cp6/my-idlers/525b1d29f0472bc75821d2b8eb0b30cd2201bdac/public/webfonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /public/webfonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cp6/my-idlers/525b1d29f0472bc75821d2b8eb0b30cd2201bdac/public/webfonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /resources/css/app.css: -------------------------------------------------------------------------------- 1 | @import "datatables.net-bs5"; 2 | @import "style.css"; 3 | -------------------------------------------------------------------------------- /resources/css/dark.css: -------------------------------------------------------------------------------- 1 | @import 'bootstrap-dark-5'; 2 | -------------------------------------------------------------------------------- /resources/css/light.css: -------------------------------------------------------------------------------- 1 | @import 'bootstrap'; 2 | -------------------------------------------------------------------------------- /resources/css/style.css: -------------------------------------------------------------------------------- 1 | /* 2 | Custom styles go in here 3 | */ 4 | 5 | .modal-mask { 6 | position: fixed; 7 | z-index: 9998; 8 | top: 0; 9 | left: 0; 10 | width: 100%; 11 | height: 100%; 12 | background-color: rgba(0, 0, 0, .5); 13 | transition: opacity .3s ease; 14 | } 15 | 16 | .modal-body { 17 | margin: 10px 0; 18 | } 19 | 20 | .modal { 21 | display: contents !important; 22 | } 23 | 24 | .form-signin input[type="password"] { 25 | margin-bottom: 10px; 26 | border-radius: var(--bs-border-radius) !important; 27 | } 28 | 29 | @media (min-width: 1400px) { 30 | .container-xxl, .container-xl, .container-lg, .container-md, .container-sm, .container { 31 | max-width: 1520px; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /resources/js/app.js: -------------------------------------------------------------------------------- 1 | require('bootstrap') 2 | require('datatables') 3 | window.Vue = require('vue/dist/vue'); 4 | window.axios = require('axios'); 5 | import $ from 'jquery'; 6 | window.jQuery = $; 7 | window.$ = $; 8 | require('datatables.net-bs5'); 9 | -------------------------------------------------------------------------------- /resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | window._ = require('lodash'); 2 | window.Vue = require('vue'); 3 | try { 4 | require('bootstrap'); 5 | } catch (e) {} 6 | 7 | /** 8 | * We'll load the axios HTTP library which allows us to easily issue requests 9 | * to our Laravel back-end. This library automatically handles sending the 10 | * CSRF token as a header based on the value of the "XSRF" token cookie. 11 | */ 12 | 13 | window.axios = require('axios'); 14 | 15 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 16 | 17 | /** 18 | * Echo exposes an expressive API for subscribing to channels and listening 19 | * for events that are broadcast by Laravel. Echo and event broadcasting 20 | * allows your team to easily build robust real-time web applications. 21 | */ 22 | 23 | // import Echo from 'laravel-echo'; 24 | 25 | // window.Pusher = require('pusher-js'); 26 | 27 | // window.Echo = new Echo({ 28 | // broadcaster: 'pusher', 29 | // key: process.env.MIX_PUSHER_APP_KEY, 30 | // cluster: process.env.MIX_PUSHER_APP_CLUSTER, 31 | // forceTLS: true 32 | // }); 33 | -------------------------------------------------------------------------------- /resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'password' => 'The provided password is incorrect.', 18 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 19 | 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Your password has been reset!', 17 | 'sent' => 'We have emailed your password reset link!', 18 | 'throttled' => 'Please wait before retrying.', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that email address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /resources/sass/_variables.scss: -------------------------------------------------------------------------------- 1 | // FontAwesome 2 | $fa-font-path: "webfonts"; -------------------------------------------------------------------------------- /resources/sass/app.scss: -------------------------------------------------------------------------------- 1 | // FontAwesome 2 | @import "~@fortawesome/fontawesome-free/scss/fontawesome"; 3 | @import "~@fortawesome/fontawesome-free/scss/regular"; 4 | @import "~@fortawesome/fontawesome-free/scss/solid"; 5 | @import "~@fortawesome/fontawesome-free/scss/brands"; 6 | 7 | // Variables 8 | @import 'variables'; 9 | -------------------------------------------------------------------------------- /resources/views/account/index.blade.php: -------------------------------------------------------------------------------- 1 | @section("title", "Edit account") 2 | 3 | 4 | Edit account 5 | 6 |
7 | 8 | 9 |
10 | @csrf 11 | @method('PUT') 12 |
13 |
14 | 15 | Name 16 | name 17 | 255 18 | {{Auth::user()->name}} 19 | 20 |
21 |
22 |
23 |
24 | 25 | Email 26 | email 27 | 255 28 | {{Auth::user()->email}} 29 | 30 |
31 |
32 |
33 |
34 | API key: {{ Auth::user()->api_token }} 35 |
36 |
37 |
38 |
39 | Update account 40 |
41 |
42 |
43 |
44 | 45 |
46 |
47 | -------------------------------------------------------------------------------- /resources/views/auth/confirm-password.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | {{ __('This is a secure area of the application. Please confirm your password before continuing.') }} 11 |
12 | 13 | 14 | 15 | 16 |
17 | @csrf 18 | 19 | 20 |
21 | 22 | 23 | 27 |
28 | 29 |
30 | 31 | {{ __('Confirm') }} 32 | 33 |
34 |
35 |
36 |
37 | -------------------------------------------------------------------------------- /resources/views/auth/forgot-password.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | {{ __('Forgot your password? No problem. Just let us know your email address and we will email you a password reset link that will allow you to choose a new one.') }} 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | @csrf 21 | 22 | 23 |
24 | 25 | 26 | 27 |
28 | 29 |
30 | 31 | {{ __('Email Password Reset Link') }} 32 | 33 |
34 |
35 |
36 |
37 | -------------------------------------------------------------------------------- /resources/views/auth/login.blade.php: -------------------------------------------------------------------------------- 1 | @section('title') {{'Login'}} @endsection 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |

@if (config()->has('app.name')) {{ config('app.name') }} @else My idlers @endif

10 |
11 | @csrf 12 |
13 | 14 | 15 | 17 |
18 |
19 | 20 | 21 | 25 |
26 | 27 |
28 | 29 | 32 |
33 | @if (Route::has('password.request')) 34 | 35 | {{ __('Forgot your password?') }} 36 | 37 | @endif 38 | 39 | {{ __('Login') }} 40 | 41 |
42 | 43 |
44 |
45 | -------------------------------------------------------------------------------- /resources/views/auth/passwords/confirm.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Confirm Password') }}
9 | 10 |
11 | {{ __('Please confirm your password before continuing.') }} 12 | 13 |
14 | @csrf 15 | 16 |
17 | 18 | 19 |
20 | 21 | 22 | @error('password') 23 | 24 | {{ $message }} 25 | 26 | @enderror 27 |
28 |
29 | 30 |
31 |
32 | 35 | 36 | @if (Route::has('password.request')) 37 | 38 | {{ __('Forgot Your Password?') }} 39 | 40 | @endif 41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | @endsection 50 | -------------------------------------------------------------------------------- /resources/views/auth/passwords/email.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Reset Password') }}
9 | 10 |
11 | @if (session('status')) 12 | 15 | @endif 16 | 17 |
18 | @csrf 19 | 20 |
21 | 22 | 23 |
24 | 25 | 26 | @error('email') 27 | 28 | {{ $message }} 29 | 30 | @enderror 31 |
32 |
33 | 34 |
35 |
36 | 39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | @endsection 48 | -------------------------------------------------------------------------------- /resources/views/auth/reset-password.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | @csrf 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 |
24 | 25 | 26 |
27 | 28 | 29 | 30 |
31 | 32 | 33 |
34 | 35 | 36 | 39 |
40 | 41 |
42 | 43 | {{ __('Reset Password') }} 44 | 45 |
46 |
47 |
48 |
49 | -------------------------------------------------------------------------------- /resources/views/auth/verify-email.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | {{ __('Thanks for signing up! Before getting started, could you verify your email address by clicking on the link we just emailed to you? If you didn\'t receive the email, we will gladly send you another.') }} 11 |
12 | 13 | @if (session('status') == 'verification-link-sent') 14 |
15 | {{ __('A new verification link has been sent to the email address you provided during registration.') }} 16 |
17 | @endif 18 | 19 |
20 |
21 | @csrf 22 | 23 |
24 | 25 | {{ __('Resend Verification Email') }} 26 | 27 |
28 |
29 | 30 |
31 | @csrf 32 | 33 | 36 |
37 |
38 |
39 |
40 | -------------------------------------------------------------------------------- /resources/views/auth/verify.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Verify Your Email Address') }}
9 | 10 |
11 | @if (session('resent')) 12 | 15 | @endif 16 | 17 | {{ __('Before proceeding, please check your email for a verification link.') }} 18 | {{ __('If you did not receive the email') }}, 19 |
20 | @csrf 21 | . 22 |
23 |
24 |
25 |
26 |
27 |
28 | @endsection 29 | -------------------------------------------------------------------------------- /resources/views/components/auth-card.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | {{ $slot }} 5 |
6 |
7 |
8 | -------------------------------------------------------------------------------- /resources/views/components/auth-session-status.blade.php: -------------------------------------------------------------------------------- 1 | @props(['status']) 2 | 3 | @if ($status) 4 |
merge(['class' => 'font-medium text-sm text-green-600']) }}> 5 | {{ $status }} 6 |
7 | @endif 8 | -------------------------------------------------------------------------------- /resources/views/components/auth-validation-errors.blade.php: -------------------------------------------------------------------------------- 1 | @props(['errors']) 2 | 3 | @if ($errors->any()) 4 |
5 |
6 | {{ __('Whoops! Something went wrong.') }} 7 |
    8 | @foreach ($errors->all() as $error) 9 |
  • {{ $error }}
  • 10 | @endforeach 11 |
12 |
13 |
14 | @endif 15 | -------------------------------------------------------------------------------- /resources/views/components/back-btn.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{$text ?? 'Go back'}} 4 | 5 | -------------------------------------------------------------------------------- /resources/views/components/back-button.blade.php: -------------------------------------------------------------------------------- 1 | {{$slot}} 2 | -------------------------------------------------------------------------------- /resources/views/components/button.blade.php: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /resources/views/components/card.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 | {{ $slot }} 4 |
5 |
6 | -------------------------------------------------------------------------------- /resources/views/components/cont-card.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |
6 |
7 |
8 | -------------------------------------------------------------------------------- /resources/views/components/currency-select.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
{{ $title ??'Currency'}}
3 | 10 |
11 | -------------------------------------------------------------------------------- /resources/views/components/datatables-assets.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /resources/views/components/date-input.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
{{$title}}
3 | 5 |
6 | -------------------------------------------------------------------------------- /resources/views/components/delete-confirm-modal.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | 38 | 39 |
40 | -------------------------------------------------------------------------------- /resources/views/components/details-footer.blade.php: -------------------------------------------------------------------------------- 1 | @if(Session::get('timer_version_footer', 0) === 1) 2 |

Built on Laravel v{{ Illuminate\Foundation\Application::VERSION }} (PHP 3 | v{{ PHP_VERSION }})

4 | @endif 5 | -------------------------------------------------------------------------------- /resources/views/components/disk-type-select.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
{{$title}}
3 |
7 | -------------------------------------------------------------------------------- /resources/views/components/dropdown-link.blade.php: -------------------------------------------------------------------------------- 1 | merge(['class' => 'block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 transition duration-150 ease-in-out']) }}>{{ $slot }} 2 | -------------------------------------------------------------------------------- /resources/views/components/dropdown.blade.php: -------------------------------------------------------------------------------- 1 | @props(['align' => 'right', 'width' => '48', 'contentClasses' => 'py-1 bg-white']) 2 | 3 | @php 4 | switch ($align) { 5 | case 'left': 6 | $alignmentClasses = 'origin-top-left left-0'; 7 | break; 8 | case 'top': 9 | $alignmentClasses = 'origin-top'; 10 | break; 11 | case 'right': 12 | default: 13 | $alignmentClasses = 'origin-top-right right-0'; 14 | break; 15 | } 16 | 17 | switch ($width) { 18 | case '48': 19 | $width = 'w-48'; 20 | break; 21 | } 22 | @endphp 23 | 24 |
25 |
26 | {{ $trigger }} 27 |
28 | 29 | 43 |
44 | -------------------------------------------------------------------------------- /resources/views/components/edit-btn.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{$text ?? 'Edit'}} 4 | 5 | -------------------------------------------------------------------------------- /resources/views/components/form-check.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 4 | 7 |
8 | -------------------------------------------------------------------------------- /resources/views/components/form-style.blade.php: -------------------------------------------------------------------------------- 1 | 41 | -------------------------------------------------------------------------------- /resources/views/components/info-card.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

5 | {{$value}} 6 | @if(isset($append)) 7 | {{$append}} 8 | @endif 9 |

10 |

{{$title}}

11 |
12 |
13 |
14 | -------------------------------------------------------------------------------- /resources/views/components/input.blade.php: -------------------------------------------------------------------------------- 1 | @props(['disabled' => false]) 2 | 3 | merge(['class' => 'form-control']) !!}> 4 | -------------------------------------------------------------------------------- /resources/views/components/label.blade.php: -------------------------------------------------------------------------------- 1 | @props(['value']) 2 | 3 | 6 | -------------------------------------------------------------------------------- /resources/views/components/labels-select.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
{{$title}}
3 | 11 |
12 | -------------------------------------------------------------------------------- /resources/views/components/locations-select.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
{{ $title ??'Location'}}
3 | 11 |
12 | -------------------------------------------------------------------------------- /resources/views/components/login-card.blade.php: -------------------------------------------------------------------------------- 1 |
2 | @isset($header) 3 |
4 | {!! $header !!} 5 |
6 | @endisset 7 | @isset($body) 8 |
9 | {!! $body !!} 10 | {{ $slot }} 11 |
12 | @endisset 13 | @isset($footer) 14 | 17 | @endisset 18 |
19 | -------------------------------------------------------------------------------- /resources/views/components/modal-delete-script.blade.php: -------------------------------------------------------------------------------- 1 | 23 | -------------------------------------------------------------------------------- /resources/views/components/modal-style.blade.php: -------------------------------------------------------------------------------- 1 | 33 | -------------------------------------------------------------------------------- /resources/views/components/nav-link.blade.php: -------------------------------------------------------------------------------- 1 | @props(['active']) 2 | 3 | @php 4 | $classes = ($active ?? false) 5 | ? 'nav-link active' 6 | : 'nav-link'; 7 | @endphp 8 | 9 | 14 | -------------------------------------------------------------------------------- /resources/views/components/number-input.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
{{$title}}
3 | 5 |
6 | -------------------------------------------------------------------------------- /resources/views/components/os-select.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
{{ $title ??'OS'}}
3 | 10 |
11 | -------------------------------------------------------------------------------- /resources/views/components/pricing-select.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 |
-------------------------------------------------------------------------------- /resources/views/components/providers-select.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
{{ $title ??'Provider'}}
3 | 10 |
11 | -------------------------------------------------------------------------------- /resources/views/components/ram-type-select.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
{{$title}}
3 |
7 | -------------------------------------------------------------------------------- /resources/views/components/response-alerts.blade.php: -------------------------------------------------------------------------------- 1 | @if ($message = Session::get('success')) 2 | 5 | @elseif($message = Session::get('error')) 6 | 9 | @endif 10 | -------------------------------------------------------------------------------- /resources/views/components/responsive-nav-link.blade.php: -------------------------------------------------------------------------------- 1 | @props(['active']) 2 | 3 | @php 4 | $classes = ($active ?? false) 5 | ? 'text-decoration-none' 6 | : 'text-decoration-none'; 7 | @endphp 8 | 9 | merge(['class' => $classes]) }}> 10 | {{ $slot }} 11 | 12 | -------------------------------------------------------------------------------- /resources/views/components/service-tally-card.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

{{ $tally }}

5 |
{{$service}}
6 |
7 |
8 |
9 | -------------------------------------------------------------------------------- /resources/views/components/submit-button.blade.php: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /resources/views/components/term-select.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
{{ $title ??'Term'}}
3 | 11 |
12 | -------------------------------------------------------------------------------- /resources/views/components/text-input.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
{{$title}}
3 | 5 | @error((string)$name){{ $message }}@enderror 6 |
7 | -------------------------------------------------------------------------------- /resources/views/components/yes-no-select.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
{{$title}}
3 |
7 | -------------------------------------------------------------------------------- /resources/views/errors/401.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Unauthorized')) 4 | @section('code', '401') 5 | @section('message', __('Unauthorized')) 6 | -------------------------------------------------------------------------------- /resources/views/errors/403.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Forbidden')) 4 | @section('code', '403') 5 | @section('message', __($exception->getMessage() ?: 'Forbidden')) 6 | -------------------------------------------------------------------------------- /resources/views/errors/404.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Not Found')) 4 | @section('code', '404') 5 | @section('message', __('Page not Found')) 6 | -------------------------------------------------------------------------------- /resources/views/errors/419.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Page Expired')) 4 | @section('code', '419') 5 | @section('message', __('Page Expired')) 6 | -------------------------------------------------------------------------------- /resources/views/errors/429.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Too Many Requests')) 4 | @section('code', '429') 5 | @section('message', __('Too Many Requests')) 6 | -------------------------------------------------------------------------------- /resources/views/errors/500.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Server Error')) 4 | @section('code', '500') 5 | @section('message', __('Server Error')) 6 | -------------------------------------------------------------------------------- /resources/views/errors/503.blade.php: -------------------------------------------------------------------------------- 1 | @extends('errors::minimal') 2 | 3 | @section('title', __('Service Unavailable')) 4 | @section('code', '503') 5 | @section('message', __('Service Unavailable')) 6 | -------------------------------------------------------------------------------- /resources/views/errors/layout.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | @yield('title') 8 | 9 | 10 | 43 | 44 | 45 |
46 |
47 |
48 | @yield('message') 49 |
50 |
51 |
52 | 53 | 54 | -------------------------------------------------------------------------------- /resources/views/labels/create.blade.php: -------------------------------------------------------------------------------- 1 | @section("title", "Add label") 2 | 3 | 4 | {{ __('Insert a new label') }} 5 | 6 |
7 | 8 |

Label information

9 | 10 | {{ route('labels.index') }} 11 | Go back 12 | 13 | 14 |
15 | @csrf 16 |
17 |
18 | 19 |
20 |
21 |
22 |
23 | Create label 24 |
25 |
26 |
27 |
28 |
29 |
30 | -------------------------------------------------------------------------------- /resources/views/layouts/app.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | @if(isset(Auth::user()->api_token)) 8 | 9 | @endif 10 | 11 | @yield('title') - @if (config()->has('app.name')) {{ config('app.name') }} @else My idlers @endif 12 | 13 | 14 | @if(Session::get('dark_mode')) 15 | 16 | @else 17 | 18 | @endif 19 | 20 | 21 | 22 | @yield('css_links') 23 | @yield('style') 24 | 25 | 26 | 27 |
28 | @include('layouts.navigation') 29 |
30 | @if(isset($header)) 31 |
32 |

33 | {{ $header}} 34 |

35 |
36 | @endif 37 | 38 |
39 | {{ $slot }} 40 |
41 | 42 | @yield('scripts') 43 | 44 | 45 | -------------------------------------------------------------------------------- /resources/views/layouts/guest.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | @yield('title') - @if (config()->has('app.name')) {{ config('app.name') }} @else My idlers @endif 9 | 10 | 11 | @if(Session::get('dark_mode')) 12 | 13 | @else 14 | 15 | @endif 16 | 17 | 18 | 19 | @yield('css_links') 20 | @yield('style') 21 | 22 | 23 | 24 | 25 | 26 | {{ $slot }} 27 | 28 | @yield('scripts') 29 | 30 | 31 | -------------------------------------------------------------------------------- /resources/views/layouts/index.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | @if(isset(Auth::user()->api_token)) 8 | 9 | @endif 10 | 11 | @yield('title') - @if (config()->has('app.name')){{ config('app.name') }} @else My idlers @endif 12 | 13 | 14 | @if(Session::get('dark_mode')) 15 | 16 | @else 17 | 18 | @endif 19 | 20 | 21 | 22 | @yield('css_links') 23 | @yield('style') 24 | 25 | 26 |
27 | @include('layouts.navigation') 28 |
29 |
30 |

31 | @yield('header') 32 |

33 |
34 |
35 | @yield('content') 36 |
37 | 38 | @yield('scripts') 39 | 40 | 41 | -------------------------------------------------------------------------------- /resources/views/locations/create.blade.php: -------------------------------------------------------------------------------- 1 | @section("title", "Add a Location") 2 | 3 | 4 | {{ __('Insert a new location') }} 5 | 6 |
7 | 8 |

Location information

9 | 10 | {{ route('locations.index') }} 11 | Go back 12 | 13 | 14 |
15 | @csrf 16 |
17 |
18 | 19 |
20 |
21 |
22 |
23 | Create location 24 |
25 |
26 |
27 |
28 |
29 |
30 | -------------------------------------------------------------------------------- /resources/views/notes/show.blade.php: -------------------------------------------------------------------------------- 1 | @section("title", "Note $note->id") 2 | 3 | 4 | {{ __('Note') }} 5 | 6 |
7 | 8 |
9 |
10 |

11 | @if(!is_null($note->server)) 12 | {{$note->server->hostname}} (server) 13 | @elseif(!is_null($note->shared)) 14 | {{$note->shared->main_domain}} (shared) 15 | @elseif(!is_null($note->reseller)) 16 | {{$note->reseller->main_domain}} (reseller) 17 | @elseif(!is_null($note->domain)) 18 | {{$note->domain->domain}}.{{$note->domain->extension}} (domain) 19 | @elseif(!is_null($note->dns)) 20 | {{$note->dns->dns_type}} {{$note->dns->hostname}} (DNS) 21 | @elseif(!is_null($note->ip)) 22 | {{$note->ip->address}} (IP) 23 | @endif 24 |

25 |
26 |
27 |
28 |
29 | {{$note->note}} 30 |
31 |
32 | 33 | {{ route('notes.index') }} 34 | 35 | 36 | {{ route('notes.edit', $note->id) }} 37 | 38 |
39 |
40 |
41 | -------------------------------------------------------------------------------- /resources/views/os/create.blade.php: -------------------------------------------------------------------------------- 1 | @section("title", "Add an operating system") 2 | 3 | 4 | {{ __('Insert a new OS') }} 5 | 6 |
7 | 8 |

Operating system name

9 | 10 | {{ route('os.index') }} 11 | Go back 12 | 13 | 14 |
15 | @csrf 16 |
17 |
18 | 19 |
20 |
21 |
22 |
23 | Create Operating system 24 |
25 |
26 |
27 |
28 |
29 |
30 | -------------------------------------------------------------------------------- /resources/views/providers/create.blade.php: -------------------------------------------------------------------------------- 1 | @section("title", "Add a provider") 2 | 3 | 4 | {{ __('Insert a new provider') }} 5 | 6 |
7 | 8 |

Provider information

9 | 10 | {{ route('providers.index') }} 11 | Go back 12 | 13 | 14 |
15 | @csrf 16 |
17 |
18 | 19 |
20 |
21 |
22 |
23 | Create provider 24 |
25 |
26 |
27 |
28 |
29 |
30 | -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 18 | }); 19 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 19 | })->purpose('Display an inspiring quote'); 20 | -------------------------------------------------------------------------------- /run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Run setup only if .env file doesn't exist. 4 | if [ ! -e .env.production ] 5 | then 6 | cat > .env.production << EOF 7 | APP_NAME=MyIdlers 8 | APP_DEBUG=false 9 | APP_KEY= 10 | 11 | DB_CONNECTION=mysql 12 | DB_HOST=${DB_HOST} 13 | DB_DATABASE=${DB_DATABASE} 14 | DB_USERNAME=${DB_USERNAME} 15 | DB_PASSWORD=${DB_PASSWORD} 16 | APP_URL=${APP_URL} 17 | EOF 18 | php artisan key:generate --no-interaction --force 19 | fi 20 | 21 | # php artisan migrate:fresh --seed 22 | php artisan serve --host=0.0.0.0 --port=8000 --env=production 23 | -------------------------------------------------------------------------------- /server.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | $uri = urldecode( 11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 12 | ); 13 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 15 | // built-in PHP web server. This provides a convenient way to test a Laravel 16 | // application without having installed a "real" web server software here. 17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | compiled.php 2 | config.php 3 | down 4 | events.scanned.php 5 | maintenance.php 6 | routes.php 7 | routes.scanned.php 8 | schedule-* 9 | services.json 10 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | const defaultTheme = require('tailwindcss/defaultTheme'); 2 | 3 | module.exports = { 4 | content: [ 5 | './vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php', 6 | './storage/framework/views/*.php', 7 | './resources/views/**/*.blade.php', 8 | ], 9 | 10 | theme: { 11 | extend: { 12 | fontFamily: { 13 | sans: ['Nunito', ...defaultTheme.fontFamily.sans], 14 | }, 15 | }, 16 | }, 17 | 18 | plugins: [require('@tailwindcss/forms')], 19 | }; 20 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/Feature/Auth/AuthenticationTest.php: -------------------------------------------------------------------------------- 1 | create(); 17 | 18 | $response = $this->get('/login'); 19 | 20 | $response->assertStatus(200); 21 | } 22 | 23 | public function test_users_can_authenticate_using_the_login_screen() 24 | { 25 | $user = User::factory()->create(); 26 | 27 | $response = $this->post('/login', [ 28 | 'email' => $user->email, 29 | 'password' => 'password', 30 | ]); 31 | 32 | $this->assertAuthenticated(); 33 | $response->assertRedirect(RouteServiceProvider::HOME); 34 | } 35 | 36 | public function test_users_can_not_authenticate_with_invalid_password() 37 | { 38 | $user = User::factory()->create(); 39 | 40 | $this->post('/login', [ 41 | 'email' => $user->email, 42 | 'password' => 'wrong-password', 43 | ]); 44 | 45 | $this->assertGuest(); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /tests/Feature/Auth/EmailVerificationTest.php: -------------------------------------------------------------------------------- 1 | create([ 20 | 'email_verified_at' => null, 21 | ]); 22 | 23 | $response = $this->actingAs($user)->get('/verify-email'); 24 | 25 | $response->assertStatus(200); 26 | } 27 | 28 | public function test_email_can_be_verified() 29 | { 30 | $user = User::factory()->create([ 31 | 'email_verified_at' => null, 32 | ]); 33 | 34 | Event::fake(); 35 | 36 | $verificationUrl = URL::temporarySignedRoute( 37 | 'verification.verify', 38 | now()->addMinutes(60), 39 | ['id' => $user->id, 'hash' => sha1($user->email)] 40 | ); 41 | 42 | $response = $this->actingAs($user)->get($verificationUrl); 43 | 44 | Event::assertDispatched(Verified::class); 45 | $this->assertTrue($user->fresh()->hasVerifiedEmail()); 46 | $response->assertRedirect(RouteServiceProvider::HOME.'?verified=1'); 47 | } 48 | 49 | public function test_email_is_not_verified_with_invalid_hash() 50 | { 51 | $user = User::factory()->create([ 52 | 'email_verified_at' => null, 53 | ]); 54 | 55 | $verificationUrl = URL::temporarySignedRoute( 56 | 'verification.verify', 57 | now()->addMinutes(60), 58 | ['id' => $user->id, 'hash' => sha1('wrong-email')] 59 | ); 60 | 61 | $this->actingAs($user)->get($verificationUrl); 62 | 63 | $this->assertFalse($user->fresh()->hasVerifiedEmail()); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /tests/Feature/Auth/PasswordConfirmationTest.php: -------------------------------------------------------------------------------- 1 | create(); 16 | 17 | $response = $this->actingAs($user)->get('/confirm-password'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | 22 | public function test_password_can_be_confirmed() 23 | { 24 | $user = User::factory()->create(); 25 | 26 | $response = $this->actingAs($user)->post('/confirm-password', [ 27 | 'password' => 'password', 28 | ]); 29 | 30 | $response->assertRedirect(); 31 | $response->assertSessionHasNoErrors(); 32 | } 33 | 34 | public function test_password_is_not_confirmed_with_invalid_password() 35 | { 36 | $user = User::factory()->create(); 37 | 38 | $response = $this->actingAs($user)->post('/confirm-password', [ 39 | 'password' => 'wrong-password', 40 | ]); 41 | 42 | $response->assertSessionHasErrors(); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /tests/Feature/Auth/PasswordResetTest.php: -------------------------------------------------------------------------------- 1 | get('/forgot-password'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | 22 | public function test_reset_password_link_can_be_requested() 23 | { 24 | Notification::fake(); 25 | 26 | $user = User::factory()->create(); 27 | 28 | $this->post('/forgot-password', ['email' => $user->email]); 29 | 30 | Notification::assertSentTo($user, ResetPassword::class); 31 | } 32 | 33 | public function test_reset_password_screen_can_be_rendered() 34 | { 35 | Notification::fake(); 36 | 37 | $user = User::factory()->create(); 38 | 39 | $this->post('/forgot-password', ['email' => $user->email]); 40 | 41 | Notification::assertSentTo($user, ResetPassword::class, function ($notification) { 42 | $response = $this->get('/reset-password/'.$notification->token); 43 | 44 | $response->assertStatus(200); 45 | 46 | return true; 47 | }); 48 | } 49 | 50 | public function test_password_can_be_reset_with_valid_token() 51 | { 52 | Notification::fake(); 53 | 54 | $user = User::factory()->create(); 55 | 56 | $this->post('/forgot-password', ['email' => $user->email]); 57 | 58 | Notification::assertSentTo($user, ResetPassword::class, function ($notification) use ($user) { 59 | $response = $this->post('/reset-password', [ 60 | 'token' => $notification->token, 61 | 'email' => $user->email, 62 | 'password' => 'password', 63 | 'password_confirmation' => 'password', 64 | ]); 65 | 66 | $response->assertSessionHasNoErrors(); 67 | 68 | return true; 69 | }); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /tests/Feature/Auth/RegistrationTest.php: -------------------------------------------------------------------------------- 1 | get('/register'); 16 | 17 | $response->assertStatus(200); 18 | } 19 | 20 | public function test_new_users_can_register() 21 | { 22 | $response = $this->post('/register', [ 23 | 'name' => 'Test User', 24 | 'email' => 'test@example.com', 25 | 'password' => 'password', 26 | 'password_confirmation' => 'password', 27 | ]); 28 | 29 | $this->assertAuthenticated(); 30 | $response->assertRedirect(RouteServiceProvider::HOME); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /tests/Feature/AuthenticationTest.php: -------------------------------------------------------------------------------- 1 | create(); 17 | 18 | $response = $this->post('/login', [ 19 | 'email' => $user->email, 20 | 'password' => 'password', 21 | ]); 22 | 23 | $this->assertAuthenticated(); 24 | $response->assertRedirect(RouteServiceProvider::HOME); 25 | } 26 | 27 | public function test_users_can_not_authenticate_with_invalid_password() 28 | { 29 | $user = User::factory()->create(); 30 | 31 | $this->post('/login', [ 32 | 'email' => $user->email, 33 | 'password' => 'wrong-password', 34 | ]); 35 | 36 | $this->assertGuest(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /tests/Feature/EmailVerificationTest.php: -------------------------------------------------------------------------------- 1 | create([ 20 | 'email_verified_at' => null, 21 | ]); 22 | 23 | $response = $this->actingAs($user)->get('/verify-email'); 24 | 25 | $response->assertStatus(200); 26 | } 27 | 28 | public function test_email_can_be_verified() 29 | { 30 | Event::fake(); 31 | 32 | $user = User::factory()->create([ 33 | 'email_verified_at' => null, 34 | ]); 35 | 36 | $verificationUrl = URL::temporarySignedRoute( 37 | 'verification.verify', 38 | now()->addMinutes(60), 39 | ['id' => $user->id, 'hash' => sha1($user->email)] 40 | ); 41 | 42 | $response = $this->actingAs($user)->get($verificationUrl); 43 | 44 | Event::assertDispatched(Verified::class); 45 | $this->assertTrue($user->fresh()->hasVerifiedEmail()); 46 | $response->assertRedirect(RouteServiceProvider::HOME.'?verified=1'); 47 | } 48 | 49 | public function test_email_is_not_verified_with_invalid_hash() 50 | { 51 | $user = User::factory()->create([ 52 | 'email_verified_at' => null, 53 | ]); 54 | 55 | $verificationUrl = URL::temporarySignedRoute( 56 | 'verification.verify', 57 | now()->addMinutes(60), 58 | ['id' => $user->id, 'hash' => sha1('wrong-email')] 59 | ); 60 | 61 | $this->actingAs($user)->get($verificationUrl); 62 | 63 | $this->assertFalse($user->fresh()->hasVerifiedEmail()); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /tests/Feature/PasswordConfirmationTest.php: -------------------------------------------------------------------------------- 1 | create(); 16 | 17 | $response = $this->actingAs($user)->get('/confirm-password'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | 22 | public function test_password_can_be_confirmed() 23 | { 24 | $user = User::factory()->create(); 25 | 26 | $response = $this->actingAs($user)->post('/confirm-password', [ 27 | 'password' => 'password', 28 | ]); 29 | 30 | $response->assertRedirect(); 31 | $response->assertSessionHasNoErrors(); 32 | } 33 | 34 | public function test_password_is_not_confirmed_with_invalid_password() 35 | { 36 | $user = User::factory()->create(); 37 | 38 | $response = $this->actingAs($user)->post('/confirm-password', [ 39 | 'password' => 'wrong-password', 40 | ]); 41 | 42 | $response->assertSessionHasErrors(); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /tests/Feature/PasswordResetTest.php: -------------------------------------------------------------------------------- 1 | get('/forgot-password'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | 22 | public function test_reset_password_link_can_be_requested() 23 | { 24 | Notification::fake(); 25 | 26 | $user = User::factory()->create(); 27 | 28 | $this->post('/forgot-password', ['email' => $user->email]); 29 | 30 | Notification::assertSentTo($user, ResetPassword::class); 31 | } 32 | 33 | public function test_reset_password_screen_can_be_rendered() 34 | { 35 | Notification::fake(); 36 | 37 | $user = User::factory()->create(); 38 | 39 | $this->post('/forgot-password', ['email' => $user->email]); 40 | 41 | Notification::assertSentTo($user, ResetPassword::class, function ($notification) { 42 | $response = $this->get('/reset-password/'.$notification->token); 43 | 44 | $response->assertStatus(200); 45 | 46 | return true; 47 | }); 48 | } 49 | 50 | public function test_password_can_be_reset_with_valid_token() 51 | { 52 | Notification::fake(); 53 | 54 | $user = User::factory()->create(); 55 | 56 | $this->post('/forgot-password', ['email' => $user->email]); 57 | 58 | Notification::assertSentTo($user, ResetPassword::class, function ($notification) use ($user) { 59 | $response = $this->post('/reset-password', [ 60 | 'token' => $notification->token, 61 | 'email' => $user->email, 62 | 'password' => 'password', 63 | 'password_confirmation' => 'password', 64 | ]); 65 | 66 | $response->assertSessionHasNoErrors(); 67 | 68 | return true; 69 | }); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /tests/Feature/RegistrationTest.php: -------------------------------------------------------------------------------- 1 | get('/register'); 16 | 17 | $response->assertStatus(200); 18 | } 19 | 20 | public function test_new_users_can_register() 21 | { 22 | $response = $this->post('/register', [ 23 | 'name' => 'Test User', 24 | 'email' => 'test@example.com', 25 | 'password' => 'password', 26 | 'password_confirmation' => 'password', 27 | ]); 28 | 29 | $this->assertAuthenticated(); 30 | $response->assertRedirect(RouteServiceProvider::HOME); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /webpack.mix.js: -------------------------------------------------------------------------------- 1 | const mix = require('laravel-mix'); 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Mix Asset Management 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Mix provides a clean, fluent API for defining some Webpack build steps 9 | | for your Laravel applications. By default, we are compiling the CSS 10 | | file for the application as well as bundling up all the JS files. 11 | | 12 | */ 13 | 14 | mix.js('resources/js/app.js', 'public/js').postCss('resources/css/app.css', 'public/css'); 15 | mix.sass('resources/sass/app.scss', 'public/css').options({ 16 | processCssUrls: false 17 | }).copy( 18 | 'node_modules/@fortawesome/fontawesome-free/webfonts/fa-regular-400.ttf', 19 | 'public/webfonts/fa-regular-400.ttf' 20 | ).copy( 21 | 'node_modules/@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff2', 22 | 'public/webfonts/fa-regular-400.woff2' 23 | ).copy( 24 | 'node_modules/@fortawesome/fontawesome-free/webfonts/fa-solid-900.ttf', 25 | 'public/webfonts/fa-solid-900.ttf' 26 | ).copy( 27 | 'node_modules/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2', 28 | 'public/webfonts/fa-solid-900.woff2' 29 | ).copy( 30 | 'node_modules/@fortawesome/fontawesome-free/webfonts/fa-brands-400.ttf', 31 | 'public/webfonts/fa-brands-400.ttf' 32 | ); 33 | mix.postCss('resources/css/light.css', 'public/css'); 34 | mix.postCss('resources/css/dark.css', 'public/css'); 35 | --------------------------------------------------------------------------------