src/Controllers/BasicController.php
public function laraException(Request $request)
    {



        $storage = Storage::disk('local');
        $fileName = base64_decode(urldecode($request->get('errors')));
        if(!$storage->exists($fileName)){
            $info = null;
        }else{
            $info = $storage->get($fileName);
        }

        $view = self::VIEW_DEFAULT;

       // $info = $request->cookie('lara_exception_code');
        $errors =[];
        if(is_null($info)){
            $errors  = [
                'details' => '',
                'message' => 'LaraException',
                'debugCode' => '0',
                'errors' => [],
                'routeBack' => ''
            ];
        }else{
            //$urlEncode = \Crypt::decrypt($info);
            //\Cookie::forget('lara_exception_code');
            ///$urlEncode = urldecode($info);
            $storage->delete($fileName);

            $data = json_decode(base64_decode($info),true);
            $errors = $data['errors'];
            $view = $data['view'];
        }
        return view($view,$errors);
    }
public function laraException(Request $request)
    {



        $storage = Storage::disk('local');
        $fileName = base64_decode(urldecode($request->get('errors')));
        if(!$storage->exists($fileName)){
            $info = null;
        }else{
            $info = $storage->get($fileName);
        }

        $view = self::VIEW_DEFAULT;

       // $info = $request->cookie('lara_exception_code');
        $errors =[];
        if(is_null($info)){
            $errors  = [
                'details' => '',
                'message' => 'LaraException',
                'debugCode' => '0',
                'errors' => [],
                'routeBack' => ''
            ];
        }else{
            //$urlEncode = \Crypt::decrypt($info);
            //\Cookie::forget('lara_exception_code');
            ///$urlEncode = urldecode($info);
            $storage->delete($fileName);

            $data = json_decode(base64_decode($info),true);
            $errors = $data['errors'];
            $view = $data['view'];
        }
        return view($view,$errors);
    }
public function laraException ( Request $ request ) { $ storage = Storage :: disk ( 'local' ) ; $ fileName = base64_decode ( urldecode ( $ request -> get ( 'errors' ) ) ) ; if ( ! $ storage -> exists ( $ fileName ) ) { $ info = null ; } else { $ info = $ storage -> get ( $ fileName ) ; } $ view = self :: VIEW_DEFAULT ; // $info = $request->cookie('lara_exception_code'); $ errors = [ ] ; if ( is_null ( $ info ) ) { $ errors = [ 'details' => '' , 'message' => 'LaraException' , 'debugCode' => '0' , 'errors' => [ ] , 'routeBack' => '' ] ; } else { //$urlEncode = \Crypt::decrypt($info); //\Cookie::forget('lara_exception_code'); ///$urlEncode = urldecode($info); $ storage -> delete ( $ fileName ) ; $ data = json_decode ( base64_decode ( $ info ) , true ) ; $ errors = $ data [ 'errors' ] ; $ view = $ data [ 'view' ] ; } return view ( $ view , $ errors ) ; }
Controlador encargado de validar que debe retornar si la vista o el response JSON
@return \Illuminate\Contracts\View\Factory|\Illuminate\Http\JsonResponse|\Illuminate\View\View
Controlador encargado de validar que debe retornar si la vista o el response JSON