Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use Caffeinated\..

Decoded Output download

<?php 
 
namespace App\Http\Controllers; 
 
use Illuminate\Http\Request; 
use Caffeinated\Shinobi\Models\Permission; 
use DB; 
use Validator; 
 
class PermisoController extends Controller 
{ 
    public function index() 
    { 
        try { 
            $permisos = Permission::all(); 
            return view("role_user.permiso.index", compact("permisos")); 
        } catch (\Exception $e) { 
            return view("errors.404"); 
        } 
    } 
    public function create() 
    { 
        try { 
            return view("role_user.permiso.create"); 
        } catch (\Exception $e) { 
            return redirect()->back(); 
        } 
    } 
    public function store(Request $request) 
    { 
        DB::beginTransaction(); 
        try { 
            $reglas = array("name" => array("required", "min:3", "max:30"), "slug" => array("required", "min:3", "max:50", "unique:permissions"), "description" => array("required", "min:3", "max:1000")); 
            $validator = Validator::make($request->all(), $reglas); 
            if ($validator->fails()) { 
                return redirect()->back()->withErrors($validator)->withInput(); 
            } 
            $permiso = new Permission(); 
            $permiso->name = strtoupper(trim($request->name)); 
            $permiso->slug = strtolower(trim($request->slug)); 
            $permiso->description = $request->description; 
            $permiso->save(); 
            DB::commit(); 
            return redirect()->to("permission")->with("info", "EL PERMISO FUE REGISTRADO CON EXITO."); 
        } catch (\Exception $e) { 
            DB::rollback(); 
            return redirect()->back()->with("errorinfo", "UPS!! OCURRIO ERROR AL REGISTRAR"); 
        } 
    } 
    public function edit($id) 
    { 
        try { 
            $permiso = Permission::find($id); 
            return view("role_user.permiso.edit", compact("permiso")); 
        } catch (\Exception $e) { 
            return redirect()->back(); 
        } 
    } 
    public function update(Request $request, $id) 
    { 
        DB::beginTransaction(); 
        try { 
            $reglas = array("name" => array("required", "min:3", "max:30"), "slug" => array("required", "min:3", "max:50"), "description" => array("required", "min:3", "max:1000")); 
            $validator = Validator::make($request->all(), $reglas); 
            if ($validator->fails()) { 
                return redirect()->back()->withErrors($validator)->withInput(); 
            } 
            $permiso = Permission::find($id); 
            $permiso->name = strtoupper(trim($request->name)); 
            $permiso->slug = strtolower(trim($request->slug)); 
            $permiso->description = $request->description; 
            $permiso->update(); 
            DB::commit(); 
            return redirect()->to("permission")->with("info", "EL PERMISO FUE ACTUALIZADO CON EXITO."); 
        } catch (\Exception $e) { 
            DB::rollback(); 
            return redirect()->back()->with("errorinfo", "UPS!! OCURRIO ERROR AL REGISTRAR"); 
        } 
    } 
} 
 ?>

Did this file decode correctly?

Original Code

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Caffeinated\Shinobi\Models\Permission;
use DB;
use Validator;

class PermisoController extends Controller
{
    public function index()
    {
        try {
            $permisos = Permission::all();
            return view("\162\x6f\x6c\x65\137\165\x73\145\x72\56\x70\x65\162\x6d\x69\163\157\x2e\x69\156\x64\145\x78", compact("\160\145\162\x6d\x69\x73\x6f\163"));
        } catch (\Exception $e) {
            return view("\x65\x72\x72\157\162\163\x2e\64\60\x34");
        }
    }
    public function create()
    {
        try {
            return view("\162\x6f\x6c\145\x5f\165\163\x65\x72\x2e\160\145\x72\155\x69\x73\157\56\x63\x72\x65\141\164\x65");
        } catch (\Exception $e) {
            return redirect()->back();
        }
    }
    public function store(Request $request)
    {
        DB::beginTransaction();
        try {
            $reglas = array("\x6e\x61\155\145" => array("\x72\145\x71\165\151\162\x65\144", "\155\x69\156\72\63", "\155\141\170\72\63\x30"), "\x73\154\x75\147" => array("\x72\145\x71\165\151\x72\145\x64", "\155\151\x6e\x3a\x33", "\x6d\141\170\72\x35\60", "\165\x6e\x69\161\165\145\x3a\160\x65\162\155\x69\163\x73\x69\157\156\163"), "\x64\x65\163\x63\162\151\x70\164\151\157\156" => array("\x72\x65\161\x75\x69\162\145\x64", "\x6d\x69\x6e\72\63", "\155\x61\170\72\x31\x30\x30\60"));
            $validator = Validator::make($request->all(), $reglas);
            if ($validator->fails()) {
                return redirect()->back()->withErrors($validator)->withInput();
            }
            $permiso = new Permission();
            $permiso->name = strtoupper(trim($request->name));
            $permiso->slug = strtolower(trim($request->slug));
            $permiso->description = $request->description;
            $permiso->save();
            DB::commit();
            return redirect()->to("\x70\x65\162\x6d\151\x73\x73\151\157\x6e")->with("\x69\x6e\x66\x6f", "\105\114\40\x50\105\x52\115\x49\123\117\x20\106\x55\105\x20\x52\105\x47\111\x53\x54\122\101\104\x4f\40\103\x4f\x4e\40\x45\130\x49\x54\x4f\56");
        } catch (\Exception $e) {
            DB::rollback();
            return redirect()->back()->with("\x65\x72\x72\x6f\x72\151\x6e\146\x6f", "\125\x50\123\x21\x21\40\x4f\103\x55\x52\122\x49\117\40\105\122\122\117\x52\40\x41\114\40\122\105\x47\111\123\124\122\101\122");
        }
    }
    public function edit($id)
    {
        try {
            $permiso = Permission::find($id);
            return view("\162\157\x6c\x65\137\x75\163\145\x72\56\x70\145\x72\155\151\x73\157\x2e\145\144\x69\x74", compact("\x70\x65\x72\x6d\x69\163\x6f"));
        } catch (\Exception $e) {
            return redirect()->back();
        }
    }
    public function update(Request $request, $id)
    {
        DB::beginTransaction();
        try {
            $reglas = array("\156\x61\155\145" => array("\x72\145\x71\x75\x69\x72\x65\144", "\x6d\151\x6e\x3a\63", "\155\141\x78\x3a\x33\x30"), "\x73\x6c\x75\147" => array("\x72\145\161\x75\x69\162\x65\144", "\155\151\x6e\x3a\63", "\x6d\x61\170\x3a\x35\60"), "\144\x65\x73\x63\x72\x69\x70\164\x69\x6f\x6e" => array("\162\145\161\165\151\x72\145\x64", "\155\151\156\72\63", "\155\141\170\72\61\x30\x30\60"));
            $validator = Validator::make($request->all(), $reglas);
            if ($validator->fails()) {
                return redirect()->back()->withErrors($validator)->withInput();
            }
            $permiso = Permission::find($id);
            $permiso->name = strtoupper(trim($request->name));
            $permiso->slug = strtolower(trim($request->slug));
            $permiso->description = $request->description;
            $permiso->update();
            DB::commit();
            return redirect()->to("\x70\x65\162\x6d\151\x73\x73\151\x6f\156")->with("\x69\x6e\x66\x6f", "\x45\x4c\40\x50\x45\x52\115\x49\123\x4f\40\x46\125\105\40\x41\103\124\125\x41\x4c\111\132\x41\x44\117\x20\x43\x4f\x4e\x20\105\130\x49\124\x4f\x2e");
        } catch (\Exception $e) {
            DB::rollback();
            return redirect()->back()->with("\x65\162\162\x6f\x72\151\156\146\x6f", "\x55\120\x53\x21\41\40\x4f\103\x55\122\x52\x49\117\x20\x45\122\x52\x4f\122\40\101\114\x20\x52\x45\x47\111\123\124\122\x41\122");
        }
    }
}

Function Calls

None

Variables

None

Stats

MD5 2fcf2a03d5c6d5c23ed32b661495055e
Eval Count 0
Decode Time 54 ms