!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/Admin/src/Http/Requests/   drwxrwxrwx
Free 12.95 GB of 57.97 GB (22.35%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Webkul\Admin\Http\Requests;

use 
Illuminate\Foundation\Http\FormRequest;
use 
Illuminate\Validation\Factory as ValidationFactory;

class 
PipelineForm extends FormRequest
{
    
/**
     * Constructor.
     *
     * @return void
     */
    
public function __construct(ValidationFactory $validationFactory)
    {
        
$this->validatorExtensions($validationFactory);
    }

    
/**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    
public function authorize()
    {
        return 
true;
    }

    
/**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    
public function rules()
    {
        if (
request('id')) {
            return [
                
'name'          => 'required|unique:lead_pipelines,name,'.request('id'),
                
'stages.*.name' => 'unique_key',
                
'stages.*.code' => 'unique_key',
            ];
        }

        return [
            
'name'          => 'required|unique:lead_pipelines,name',
            
'rotten_days'   => 'required',
            
'stages.*.name' => 'unique_key',
            
'stages.*.code' => 'unique_key',
        ];
    }

    
/**
     * Get the error messages for the defined validation rules.
     *
     * @return array
     */
    
public function messages()
    {
        return [
            
'stages.*.name.unique_key' => __('admin::app.settings.pipelines.duplicate-name'),
        ];
    }

    
/**
     * Place all your validator extensions here.
     *
     * @return void
     */
    
public function validatorExtensions(ValidationFactory $validationFactory)
    {
        
$validationFactory->extend(
            
'unique_key',
            function (
$attribute$value$parameters) {
                
$key last(explode('.'$attribute));

                
$stages collect(request()->get('stages'))->filter(function ($stage) use ($key$value) {
                    return 
$stage[$key] === $value;
                });

                if (
$stages->count() > 1) {
                    return 
false;
                }

                return 
true;
            }
        );
    }
}

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