z-song / laravel-admin

Build a full-featured administrative interface in ten minutes
https://laravel-admin.org
MIT License
11.15k stars 2.81k forks source link

Undefined variable: errors (View: /var/www/..../vendor/encore/laravel-admin/resources/views/partials/exception.blade.php) #5198

Closed glrvrl closed 3 years ago

glrvrl commented 3 years ago

Description:

my list: composer show -i You are using the deprecated option "installed". Only installed packages are shown by default now. The --all option can be used to show all packages. asm89/stack-cors v2.0.2 Cross-origin resource sharing library and stack middleware brick/math 0.9.1 Arbitrary-precision arithmetic library dnoegel/php-xdg-base-dir v0.1.1 implementation of xdg base directory specification for php doctrine/cache 1.10.2 PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and others. doctrine/dbal 2.12.1 Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management. doctrine/event-manager 1.1.1 The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects. doctrine/inflector 2.0.3 PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words. doctrine/instantiator 1.4.0 A small, lightweight utility to instantiate objects in PHP without invoking their constructors doctrine/lexer 1.2.1 PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers. dragonmantank/cron-expression v3.1.0 CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due egulias/email-validator 2.1.25 A library for validating emails against several RFCs encore/laravel-admin dev-master ab909f3 laravel admin facade/flare-client-php 1.3.7 Send PHP errors to Flare facade/ignition 2.5.8 A beautiful error page for Laravel applications. facade/ignition-contracts 1.0.2 Solution contracts for Ignition fakerphp/faker v1.13.0 Faker is a PHP library that generates fake data for you. fideloper/proxy 4.4.1 Set trusted proxies for Laravel filp/whoops 2.9.1 php error handling for cool kids fruitcake/laravel-cors v2.0.3 Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application graham-campbell/result-type v1.0.1 An Implementation Of The Result Type guzzlehttp/guzzle 7.2.0 Guzzle is a PHP HTTP client library guzzlehttp/promises 1.4.0 Guzzle promises library guzzlehttp/psr7 1.7.0 PSR-7 message implementation that also provides common utility methods hamcrest/hamcrest-php v2.0.1 This is the PHP port of Hamcrest Matchers intervention/image 2.5.1 Image handling and manipulation library with support for Laravel integration laravel/framework v8.20.1 The Laravel Framework. laravel/tinker v2.5.0 Powerful REPL for the Laravel framework. league/commonmark 1.5.7 Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and Github-Flavored Markdown (GFM) league/flysystem 1.1.3 Filesystem abstraction: Many filesystems, one API. league/mime-type-detection 1.5.1 Mime-type detection for Flysystem mews/captcha 3.2.4 Laravel 5 & 6 Captcha Package mockery/mockery 1.4.2 Mockery is a simple yet flexible PHP mock object framework monolog/monolog 2.2.0 Sends your logs to files, sockets, inboxes, databases and various web services myclabs/deep-copy 1.10.2 Create deep copies (clones) of your objects nesbot/carbon 2.43.0 An API extension for DateTime that supports 281 different languages. nikic/php-parser v4.10.4 A PHP parser written in PHP nunomaduro/collision v5.1.0 Cli error handling for console/command-line PHP applications. opis/closure 3.6.1 A library that can be used to serialize closures (anonymous functions) and arbitrary objects. phar-io/manifest 2.0.1 Component for reading phar.io manifest information from a PHP Archive (PHAR) phar-io/version 3.0.4 Library for handling version information and constraints phpdocumentor/reflection-common 2.2.0 Common reflection classes used by phpdocumentor to reflect the code structure phpdocumentor/reflection-docblock 5.2.2 With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock. phpdocumentor/type-resolver 1.4.0 A PSR-5 based resolver of Class names, Types and Structural Element Names phpoption/phpoption 1.7.5 Option Type for PHP phpspec/prophecy 1.12.2 Highly opinionated mocking framework for PHP 5.3+ phpunit/php-code-coverage 9.2.5 Library that provides collection, processing, and rendering functionality for PHP code coverage information. phpunit/php-file-iterator 3.0.5 FilterIterator implementation that filters files based on a list of suffixes. phpunit/php-invoker 3.1.1 Invoke callables with a timeout phpunit/php-text-template 2.0.4 Simple template engine. phpunit/php-timer 5.0.3 Utility class for timing phpunit/phpunit 9.5.0 The PHP Unit Testing framework. psr/container 1.0.0 Common Container Interface (PHP FIG PSR-11) psr/event-dispatcher 1.0.0 Standard interfaces for event handling. psr/http-client 1.0.1 Common interface for HTTP clients psr/http-message 1.0.1 Common interface for HTTP messages psr/log 1.1.3 Common interface for logging libraries psr/simple-cache 1.0.1 Common interfaces for simple caching psy/psysh v0.10.5 An interactive shell for modern PHP. ralouphie/getallheaders 3.0.3 A polyfill for getallheaders. ramsey/collection 1.1.1 A PHP 7.2+ library for representing and manipulating collections. ramsey/uuid 4.1.1 A PHP library for generating and working with universally unique identifiers (UUIDs). sebastian/cli-parser 1.0.1 Library for parsing CLI options sebastian/code-unit 1.0.8 Collection of value objects that represent the PHP code units sebastian/code-unit-reverse-lookup 2.0.3 Looks up which function or method a line of code belongs to sebastian/comparator 4.0.6 Provides the functionality to compare PHP values for equality sebastian/complexity 2.0.2 Library for calculating the complexity of PHP code units sebastian/diff 4.0.4 Diff implementation sebastian/environment 5.1.3 Provides functionality to handle HHVM/PHP environments sebastian/exporter 4.0.3 Provides the functionality to export PHP variables for visualization sebastian/global-state 5.0.2 Snapshotting of global state sebastian/lines-of-code 1.0.3 Library for counting the lines of code in PHP source code sebastian/object-enumerator 4.0.4 Traverses array structures and object graphs to enumerate all referenced objects sebastian/object-reflector 2.0.4 Allows reflection of object attributes, including inherited and non-public ones sebastian/recursion-context 4.0.4 Provides functionality to recursively process PHP variables sebastian/resource-operations 3.0.3 Provides a list of PHP built-in functions that operate on resources sebastian/type 2.3.1 Collection of value objects that represent the types of the PHP type system sebastian/version 3.0.2 Library that helps with managing the version number of Git-hosted PHP projects swiftmailer/swiftmailer v6.2.4 Swiftmailer, free feature-rich PHP mailer symfony/console v5.2.1 Symfony Console Component symfony/css-selector v5.2.1 Symfony CssSelector Component symfony/deprecation-contracts v2.2.0 A generic function and convention to trigger deprecation notices symfony/dom-crawler v5.2.1 Symfony DomCrawler Component symfony/error-handler v5.2.1 Symfony ErrorHandler Component symfony/event-dispatcher v5.2.1 Symfony EventDispatcher Component symfony/event-dispatcher-contracts v2.2.0 Generic abstractions related to dispatching event symfony/finder v5.2.1 Symfony Finder Component symfony/http-client-contracts v2.3.1 Generic abstractions related to HTTP clients symfony/http-foundation v5.2.1 Symfony HttpFoundation Component symfony/http-kernel v5.2.1 Symfony HttpKernel Component symfony/mime v5.2.1 A library to manipulate MIME messages symfony/polyfill-ctype v1.20.0 Symfony polyfill for ctype functions symfony/polyfill-iconv v1.20.0 Symfony polyfill for the Iconv extension symfony/polyfill-intl-grapheme v1.20.0 Symfony polyfill for intl's grapheme_* functions symfony/polyfill-intl-idn v1.20.0 Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions symfony/polyfill-intl-normalizer v1.20.0 Symfony polyfill for intl's Normalizer class and related functions symfony/polyfill-mbstring v1.20.0 Symfony polyfill for the Mbstring extension symfony/polyfill-php72 v1.20.0 Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions symfony/polyfill-php73 v1.20.0 Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions symfony/polyfill-php80 v1.20.0 Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions symfony/process v5.2.1 Symfony Process Component symfony/routing v5.2.1 Symfony Routing Component symfony/service-contracts v2.2.0 Generic abstractions related to writing services symfony/string v5.2.1 Symfony String component symfony/translation v5.2.1 Symfony Translation Component symfony/translation-contracts v2.3.0 Generic abstractions related to translation symfony/var-dumper v5.2.1 Symfony mechanism for exploring and dumping PHP variables theseer/tokenizer 1.2.0 A small library for converting tokenized PHP source code into XML and potentially other formats tijsverkoyen/css-to-inline-styles 2.2.3 CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you'... vlucas/phpdotenv v5.2.0 Loads environment variables from .env to getenv(), $_ENV and $_SERVER automagically. voku/portable-ascii 1.5.6 Portable ASCII library - performance optimized (ascii) string functions for php. webmozart/assert 1.9.1 Assertions to validate method input/output with nice error messages.

Steps To Reproduce:

i cleared view cache with , php artisan view:clear

when call sub function raise this error,

Undefined variable: errors (View: /var/www/..../vendor/encore/laravel-admin/resources/views/partials/exception.blade.php)

my function---- ` function POS(Content $content,Request $request) { $checkout_result= $request->get('checkout_result',null);

    if(!empty($checkout_result)) {
        if($checkout_result==='ok') {

            $this->NewTransaction($content,$request); //error 

.......... return redirect()->route('panel',['status'=>$status,'msg'=>$msg]); `

glrvrl commented 3 years ago

anyone help?

Hel5ing commented 3 years ago

anyone help? I solved it by adding isset($errors) into the @if condition in the file .../partials/exception.blade.php , like this:

@if(isset($errors) && $errors->hasBag('exception') && config('app.debug') == true)

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.