!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/queuepro/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/   drwxrwxr-x
Free 13.11 GB of 57.97 GB (22.62%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     InteractsWithDatabase.php (7.26 KB)      -rwxrwxr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace Illuminate\Foundation\Testing\Concerns;

use 
Illuminate\Contracts\Support\Jsonable;
use 
Illuminate\Database\Eloquent\Model;
use 
Illuminate\Database\Eloquent\SoftDeletes;
use 
Illuminate\Support\Arr;
use 
Illuminate\Support\Facades\DB;
use 
Illuminate\Testing\Constraints\CountInDatabase;
use 
Illuminate\Testing\Constraints\HasInDatabase;
use 
Illuminate\Testing\Constraints\NotSoftDeletedInDatabase;
use 
Illuminate\Testing\Constraints\SoftDeletedInDatabase;
use 
PHPUnit\Framework\Constraint\LogicalNot as ReverseConstraint;

trait 
InteractsWithDatabase
{
    
/**
     * Assert that a given where condition exists in the database.
     *
     * @param  \Illuminate\Database\Eloquent\Model|string  $table
     * @param  array  $data
     * @param  string|null  $connection
     * @return $this
     */
    
protected function assertDatabaseHas($table, array $data$connection null)
    {
        
$this->assertThat(
            
$this->getTable($table), new HasInDatabase($this->getConnection($connection$table), $data)
        );

        return 
$this;
    }

    
/**
     * Assert that a given where condition does not exist in the database.
     *
     * @param  \Illuminate\Database\Eloquent\Model|string  $table
     * @param  array  $data
     * @param  string|null  $connection
     * @return $this
     */
    
protected function assertDatabaseMissing($table, array $data$connection null)
    {
        
$constraint = new ReverseConstraint(
            new 
HasInDatabase($this->getConnection($connection$table), $data)
        );

        
$this->assertThat($this->getTable($table), $constraint);

        return 
$this;
    }

    
/**
     * Assert the count of table entries.
     *
     * @param  \Illuminate\Database\Eloquent\Model|string  $table
     * @param  int  $count
     * @param  string|null  $connection
     * @return $this
     */
    
protected function assertDatabaseCount($tableint $count$connection null)
    {
        
$this->assertThat(
            
$this->getTable($table), new CountInDatabase($this->getConnection($connection$table), $count)
        );

        return 
$this;
    }

    
/**
     * Assert the given record has been "soft deleted".
     *
     * @param  \Illuminate\Database\Eloquent\Model|string  $table
     * @param  array  $data
     * @param  string|null  $connection
     * @param  string|null  $deletedAtColumn
     * @return $this
     */
    
protected function assertSoftDeleted($table, array $data = [], $connection null$deletedAtColumn 'deleted_at')
    {
        if (
$this->isSoftDeletableModel($table)) {
            return 
$this->assertSoftDeleted(
                
$table->getTable(),
                
array_merge($data, [$table->getKeyName() => $table->getKey()]),
                
$table->getConnectionName(),
                
$table->getDeletedAtColumn()
            );
        }

        
$this->assertThat(
            
$this->getTable($table), new SoftDeletedInDatabase($this->getConnection($connection$table), $data$deletedAtColumn)
        );

        return 
$this;
    }

    
/**
     * Assert the given record has not been "soft deleted".
     *
     * @param  \Illuminate\Database\Eloquent\Model|string  $table
     * @param  array  $data
     * @param  string|null  $connection
     * @param  string|null  $deletedAtColumn
     * @return $this
     */
    
protected function assertNotSoftDeleted($table, array $data = [], $connection null$deletedAtColumn 'deleted_at')
    {
        if (
$this->isSoftDeletableModel($table)) {
            return 
$this->assertNotSoftDeleted(
                
$table->getTable(),
                
array_merge($data, [$table->getKeyName() => $table->getKey()]),
                
$table->getConnectionName(),
                
$table->getDeletedAtColumn()
            );
        }

        
$this->assertThat(
            
$this->getTable($table), new NotSoftDeletedInDatabase($this->getConnection($connection$table), $data$deletedAtColumn)
        );

        return 
$this;
    }

    
/**
     * Assert the given model exists in the database.
     *
     * @param  \Illuminate\Database\Eloquent\Model  $model
     * @return $this
     */
    
protected function assertModelExists($model)
    {
        return 
$this->assertDatabaseHas(
            
$model->getTable(),
            [
$model->getKeyName() => $model->getKey()],
            
$model->getConnectionName()
        );
    }

    
/**
     * Assert the given model does not exist in the database.
     *
     * @param  \Illuminate\Database\Eloquent\Model  $model
     * @return $this
     */
    
protected function assertModelMissing($model)
    {
        return 
$this->assertDatabaseMissing(
            
$model->getTable(),
            [
$model->getKeyName() => $model->getKey()],
            
$model->getConnectionName()
        );
    }

    
/**
     * Determine if the argument is a soft deletable model.
     *
     * @param  mixed  $model
     * @return bool
     */
    
protected function isSoftDeletableModel($model)
    {
        return 
$model instanceof Model
            
&& in_array(SoftDeletes::class, class_uses_recursive($model));
    }

    
/**
     * Cast a JSON string to a database compatible type.
     *
     * @param  array|string  $value
     * @return \Illuminate\Database\Query\Expression
     */
    
public function castAsJson($value)
    {
        if (
$value instanceof Jsonable) {
            
$value $value->toJson();
        } elseif (
is_array($value) || is_object($value)) {
            
$value json_encode($value);
        }

        
$value DB::connection()->getPdo()->quote($value);

        return 
DB::raw("CAST($value AS JSON)");
    }

    
/**
     * Get the database connection.
     *
     * @param  string|null  $connection
     * @param  string|null  $table
     * @return \Illuminate\Database\Connection
     */
    
protected function getConnection($connection null$table null)
    {
        
$database $this->app->make('db');

        
$connection $connection ?: $this->getTableConnection($table) ?: $database->getDefaultConnection();

        return 
$database->connection($connection);
    }

    
/**
     * Get the table name from the given model or string.
     *
     * @param  \Illuminate\Database\Eloquent\Model|string  $table
     * @return string
     */
    
protected function getTable($table)
    {
        return 
$this->newModelFor($table)?->getTable() ?: $table;
    }

    
/**
     * Get the table connection specified in the given model.
     *
     * @param  \Illuminate\Database\Eloquent\Model|string  $table
     * @return string|null
     */
    
protected function getTableConnection($table)
    {
        return 
$this->newModelFor($table)?->getConnectionName();
    }

    
/**
     * Get the model entity from the given model or string.
     *
     * @param  \Illuminate\Database\Eloquent\Model|string  $table
     * @return \Illuminate\Database\Eloquent\Model|null
     */
    
protected function newModelFor($table)
    {
        return 
is_subclass_of($tableModel::class) ? (new $table) : null;
    }

    
/**
     * Seed a given database connection.
     *
     * @param  array|string  $class
     * @return $this
     */
    
public function seed($class 'Database\\Seeders\\DatabaseSeeder')
    {
        foreach (
Arr::wrap($class) as $class) {
            
$this->artisan('db:seed', ['--class' => $class'--no-interaction' => true]);
        }

        return 
$this;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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

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