overtrue / laravel-ueditor

UEditor integration for Laravel.
390 stars 97 forks source link

FatalErrorException in Uploading.php line 24: Trait 'Illuminate\Foundation\Events\Dispatchable' not found #31

Closed dan381006472 closed 7 years ago

dan381006472 commented 7 years ago

之前配置 ueditor 成功了,上传图片什么都可以使用。今天上传图片 发现代码报错 报错信息:

FatalErrorException in Uploading.php line 24:
Trait 'Illuminate\Foundation\Events\Dispatchable' not found

提示 缺少文件 Dispatchable ,搜索项目发现没有 Dispatchable文件, Dispatchable 只在Laravel 5.4 中有,Laravel 5.3 并没有这个文件

yl commented 7 years ago

+1

overtrue commented 7 years ago

请更新到 1.2.6

dan381006472 commented 7 years ago

wechatimg64

dan381006472 commented 7 years ago

更新到 1.2.6 还是报错

overtrue commented 7 years ago

laravel 5.3...我艹。。。

overtrue commented 7 years ago

@dan381006472 你的 disk 是设置的哪个

dan381006472 commented 7 years ago

恩 Laravel5.3 disk设置的七牛云

overtrue commented 7 years ago

@dan381006472 七牛云什么 SDK,哪个版本

dan381006472 commented 7 years ago

跟着 laravist 那个视频写的

overtrue commented 7 years ago

我问的是版本啊,没问你跟着哪里写的啊。。。 😭

dan381006472 commented 7 years ago
{
    "name": "qiniu/php-sdk",
    "type": "library",
    "description": "Qiniu Resource (Cloud) Storage SDK for PHP",
    "keywords": ["qiniu", "storage", "sdk", "cloud"],
    "homepage": "http://developer.qiniu.com/",
    "license": "MIT",
    "authors": [
        {
            "name": "Qiniu",
            "email": "sdk@qiniu.com",
            "homepage": "http://www.qiniu.com"
        }
    ],
    "require": {
        "php": ">=5.3.3"
    },
    "require-dev": {
        "phpunit/phpunit": "~4.0",
        "squizlabs/php_codesniffer": "~2.3"
    },
    "autoload": {
        "psr-4": {"Qiniu\\": "src/Qiniu"},
        "files": ["src/Qiniu/functions.php"]
    }
}
overtrue commented 7 years ago

这个不支持 laravel 哦亲,我建议你使用以下命令然后贴结果给我:

$ composer info
dan381006472 commented 7 years ago
barryvdh/laravel-debugbar             v2.4.1            PHP Debugbar integration for Laravel
barryvdh/laravel-ide-helper           v2.4.0            Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-comple...
barryvdh/reflection-docblock          v2.0.4
classpreloader/classpreloader         3.1.0             Helps class loading performance by generating a single PHP file containing all of the autolo...
dnoegel/php-xdg-base-dir              0.1               implementation of xdg base directory specification for php
doctrine/cache                        v1.6.1            Caching library offering an object-oriented API for many cache backends
doctrine/inflector                    v1.1.0            Common String Manipulations with regard to casing and singular/plural rules.
doctrine/instantiator                 1.0.5             A small, lightweight utility to instantiate objects in PHP without invoking their constructors
fzaninotto/faker                      v1.6.0            Faker is a PHP library that generates fake data for you.
guzzlehttp/guzzle                     6.2.3             Guzzle is a PHP HTTP client library
guzzlehttp/promises                   v1.3.1            Guzzle promises library
guzzlehttp/psr7                       1.4.2             PSR-7 message implementation that also provides common utility methods
hamcrest/hamcrest-php                 v1.2.2            This is the PHP port of Hamcrest Matchers
hieu-le/active                        3.4.0             The helper class for Laravel (4/5) applications to get active class base on current route
jakub-onderka/php-console-color       0.1
jakub-onderka/php-console-highlighter v0.3.2
jeremeamia/SuperClosure               2.3.0             Serialize Closure objects, including their context and binding
laravel/framework                     v5.3.31           The Laravel Framework.
laravelcollective/html                v5.3.2            HTML and Form Builders for the Laravel Framework
league/flysystem                      1.0.40            Filesystem abstraction: Many filesystems, one API.
maatwebsite/excel                     2.1.19            An eloquent way of importing and exporting Excel and CSV in Laravel 4 with the power of PHPE...
maximebf/debugbar                     1.13.1            Debug bar in the browser for php application
mockery/mockery                       0.9.9             Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPU...
monolog/monolog                       1.23.0            Sends your logs to files, sockets, inboxes, databases and various web services
mtdowling/cron-expression             v1.2.0            CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due
myclabs/deep-copy                     1.6.1             Create deep copies (clones) of your objects
nesbot/carbon                         1.22.1            A simple API extension for DateTime.
nikic/php-parser                      v3.0.6            A PHP parser written in PHP
overtrue/laravel-ueditor              1.2.6             UEditor integration for Laravel.
overtrue/socialite                    1.1.1             A collection of OAuth 2 packages that extracts from laravel/socialite.
overtrue/wechat                       3.3.5             微信SDK
paragonie/random_compat               v2.0.10           PHP 5.x polyfill for random_bytes() and random_int() from PHP 7
phpdocumentor/reflection-common       1.0               Common reflection classes used by phpdocumentor to reflect the code structure
phpdocumentor/reflection-docblock     3.1.1             With this component, a library can provide support for annotations via DocBlocks or otherwis...
phpdocumentor/type-resolver           0.2.1
phpoffice/phpexcel                    1.8.1             PHPExcel - OpenXML - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine
phpspec/prophecy                      v1.7.0            Highly opinionated mocking framework for PHP 5.3+
phpunit/php-code-coverage             4.0.8             Library that provides collection, processing, and rendering functionality for PHP code cover...
phpunit/php-file-iterator             1.4.2             FilterIterator implementation that filters files based on a list of suffixes.
phpunit/php-text-template             1.2.1             Simple template engine.
phpunit/php-timer                     1.0.9             Utility class for timing
phpunit/php-token-stream              1.4.11            Wrapper around PHP's tokenizer extension.
phpunit/phpunit                       5.7.21            The PHP Unit Testing framework.
phpunit/phpunit-mock-objects          3.4.4             Mock Object library for PHPUnit
pimple/pimple                         v3.1.0            Pimple, a simple Dependency Injection Container
predis/predis                         v1.1.1            Flexible and feature-complete Redis client for PHP and HHVM
psr/container                         1.0.0             Common Container Interface (PHP FIG PSR-11)
psr/http-message                      1.0.1             Common interface for HTTP messages
psr/log                               1.0.2             Common interface for logging libraries
psy/psysh                             v0.8.8            An interactive shell for modern PHP.
qiniu/php-sdk                         v7.1.3            Qiniu Resource (Cloud) Storage SDK for PHP
ramsey/uuid                           3.6.1             Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 uni...
sebastian/code-unit-reverse-lookup    1.0.1             Looks up which function or method a line of code belongs to
sebastian/comparator                  1.2.4             Provides the functionality to compare PHP values for equality
sebastian/diff                        1.4.3             Diff implementation
sebastian/environment                 2.0.0             Provides functionality to handle HHVM/PHP environments
sebastian/exporter                    2.0.0             Provides the functionality to export PHP variables for visualization
sebastian/global-state                1.1.1             Snapshotting of global state
sebastian/object-enumerator           2.0.1             Traverses array structures and object graphs to enumerate all referenced objects
sebastian/recursion-context           2.0.0             Provides functionality to recursively process PHP variables
sebastian/resource-operations         1.0.0             Provides a list of PHP built-in functions that operate on resources
sebastian/version                     2.0.1             Library that helps with managing the version number of Git-hosted PHP projects
spatie/db-dumper                      2.7.0             Dump databases
spatie/laravel-backup                 4.18.0            A Laravel 5 package to backup your application
spatie/temporary-directory            1.1.2             The `temporary-directory` package allows you to easily create, use and destroy temporary dir...
swiftmailer/swiftmailer               v5.4.8            Swiftmailer, free feature-rich PHP mailer
symfony/class-loader                  v3.3.3            Symfony ClassLoader Component
symfony/console                       v3.1.10           Symfony Console Component
symfony/css-selector                  v3.1.10           Symfony CssSelector Component
symfony/debug                         v3.1.10           Symfony Debug Component
symfony/dom-crawler                   v3.1.10           Symfony DomCrawler Component
symfony/event-dispatcher              v3.3.3            Symfony EventDispatcher Component
symfony/finder                        v3.1.10           Symfony Finder Component
symfony/http-foundation               v3.1.10           Symfony HttpFoundation Component
symfony/http-kernel                   v3.1.10           Symfony HttpKernel Component
symfony/polyfill-mbstring             v1.4.0            Symfony polyfill for the Mbstring extension
symfony/polyfill-php56                v1.4.0            Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions
symfony/polyfill-util                 v1.4.0            Symfony utilities for portability of PHP codes
symfony/process                       v3.1.10           Symfony Process Component
symfony/psr-http-message-bridge       v1.0.0            PSR HTTP message bridge
symfony/routing                       v3.1.10           Symfony Routing Component
symfony/translation                   v3.1.10           Symfony Translation Component
symfony/var-dumper                    v3.1.10           Symfony mechanism for exploring and dumping PHP variables
symfony/yaml                          v3.3.3            Symfony Yaml Component
tijsverkoyen/css-to-inline-styles     2.2.0             CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/fi...
vlucas/phpdotenv                      v2.4.0            Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.
webmozart/assert                      1.2.0             Assertions to validate method input/output with nice error messages.
zgldh/qiniu-laravel-storage           v0.6.8            Qiniu Resource (Cloud) Storage SDK for Laravel 5
zizaco/entrust                        5.2.x-dev 3623cc0 This package provides a flexible way to add Role-based Permissions to Laravel
overtrue commented 7 years ago

所以你用的 zgldh/qiniu-laravel-storage 这个啊,它不支持生成 URL...,建议更换:

$ composer remove zgldh/qiniu-laravel-storage && composer require overtrue/laravel-filesystem-qiniu
overtrue commented 7 years ago

当然了,记得按文档操作:https://github.com/overtrue/laravel-filesystem-qiniu

dan381006472 commented 7 years ago

十分感谢!终于可以用了,是我最近改 其他模块 上传图片的功能,用错了七牛的sdk版本