Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call to undefined method Spatie\Glide\GlideImage::load() #62

Closed
TnCoders opened this issue Jan 23, 2017 · 9 comments
Closed

Call to undefined method Spatie\Glide\GlideImage::load() #62

TnCoders opened this issue Jan 23, 2017 · 9 comments

Comments

@TnCoders
Copy link

Hi I Just Downloaded This package and It's not woking I thing many files are missing:

I did all this :
composer require spatie/laravel-glide
And configuration also,

but in the vendor I can't see where is the route config even the laravel-glide.php is empty just the driver gd

I can't see al that config when published. What IM doing wrong ?

@freekmurze
Copy link
Member

The latest version of this package requires PHP 7. Maybe you've pulled in an older version?

Try to install the package in a fresh copy of Laravel. Are all the files being pulled in there?

@TnCoders
Copy link
Author

hi @freekmurze im in Local Im using PHP 7.0.10

i just did "composer require spatie/laravel-glide "

APP.php
'Spatie\Glide\GlideServiceProvider',
'GlideImage' => 'Spatie\Glide\GlideImageFacade',

Publish:
php artisan vendor:publish --provider="Spatie\Glide\GlideServiceProvider"

The config file looks like this:
Here it's not the same as i Have only the GD driver configuration

I did only that i didin't configred a route or anything else and in a view i just puted this :

and i have this Error:
Call to undefined method Spatie\Glide\GlideImage::load()

@TnCoders
Copy link
Author

laravel-glid
This is the vendor structure and content after instalation

@freekmurze
Copy link
Member

What's the output of composer show and php -v if you run those commands in your project directory?

@TnCoders
Copy link
Author

This is my composer Show


classpreloader/classpreloader 3.1.0 Helps class loading performance by generating a single PHP file containing all of the autoloaded files for a specific use case
cocur/slugify v2.3 Converts a string into a slug.
cviebrock/eloquent-sluggable 4.1.0 Easy creation of slugs for your Eloquent models in Laravel
dimsav/laravel-translatable v6.0.1 A Laravel package for multilingual models
dnoegel/php-xdg-base-dir 0.1 implementation of xdg base directory specification for php
doctrine/annotations v1.3.1 Docblock Annotations Parser
doctrine/cache v1.6.1 Caching library offering an object-oriented API for many cache backends
doctrine/collections v1.4.0 Collections Abstraction library
doctrine/common v2.7.2 Common Library for Doctrine projects
doctrine/dbal v2.5.10 Database Abstraction Layer
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
doctrine/lexer v1.0.1 Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.
fzaninotto/faker v1.6.0 Faker is a PHP library that generates fake data for you.
guzzlehttp/psr7 1.3.1 PSR-7 message implementation
hamcrest/hamcrest-php v1.2.2 This is the PHP port of Hamcrest Matchers
intervention/image 2.3.9 Image handling and manipulation library with support for Laravel integration
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.29 The Laravel Framework.
laravelcollective/html v5.3.0 HTML and Form Builders for the Laravel Framework
league/flysystem 1.0.33 Filesystem abstraction: Many filesystems, one API.
league/glide 1.2.1 Wonderfully easy on-demand image manipulation library with an HTTP based API.
mcamara/laravel-localization 1.1.12 Easy localization for Laravel
mockery/mockery 0.9.7 Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core ...
monolog/monolog 1.22.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.5.5 Create deep copies (clones) of your objects
nesbot/carbon 1.22.1 A simple API extension for DateTime.
nikic/php-parser v3.0.2 A PHP parser written in PHP
paragonie/random_compat v2.0.4 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 otherwise retrieve information that is embedded in a DocBlock.
phpdocumentor/type-resolver 0.2.1
phpspec/prophecy v1.6.2 Highly opinionated mocking framework for PHP 5.3+
phpunit/php-code-coverage 4.0.5 Library that provides collection, processing, and rendering functionality for PHP code coverage information.
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.8 Utility class for timing
phpunit/php-token-stream 1.4.9 Wrapper around PHP's tokenizer extension.
phpunit/phpunit 5.7.6 The PHP Unit Testing framework.
phpunit/phpunit-mock-objects 3.4.3 Mock Object library for PHPUnit
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.1 An interactive shell for modern PHP.
ramsey/uuid 3.5.2 Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).
sebastian/code-unit-reverse-lookup 1.0.0 Looks up which function or method a line of code belongs to
sebastian/comparator 1.2.2 Provides the functionality to compare PHP values for equality
sebastian/diff 1.4.1 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.0 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/laravel-glide 3.0.1 Easily convert images with Glide
swiftmailer/swiftmailer v5.4.5 Swiftmailer, free feature-rich PHP mailer
symfony/console v3.1.9 Symfony Console Component
symfony/css-selector v3.1.9 Symfony CssSelector Component
symfony/debug v3.1.9 Symfony Debug Component
symfony/dom-crawler v3.1.9 Symfony DomCrawler Component
symfony/event-dispatcher v3.2.2 Symfony EventDispatcher Component
symfony/finder v3.1.9 Symfony Finder Component
symfony/http-foundation v3.1.9 Symfony HttpFoundation Component
symfony/http-kernel v3.1.9 Symfony HttpKernel Component
symfony/polyfill-mbstring v1.3.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php56 v1.3.0 Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions
symfony/polyfill-util v1.3.0 Symfony utilities for portability of PHP codes
symfony/process v3.1.9 Symfony Process Component
symfony/routing v3.1.9 Symfony Routing Component
symfony/translation v3.1.9 Symfony Translation Component
symfony/var-dumper v3.1.9 Symfony mechanism for exploring and dumping PHP variables
symfony/yaml v3.2.2 Symfony Yaml Component
unisharp/laravel-filemanager 1.6.3 A file upload/editor intended for use with Laravel 5 and CKEditor / TinyMCE
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.


php -v output :

PHP 7.0.12 (cli) (built: Oct 13 2016 11:04:23) ( ZTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies

@TnCoders
Copy link
Author

@freekmurze i can't even the controller folder please can you help me

@freekmurze
Copy link
Member

In the version you're pulling in you must use GlideImage::create($pathToImage) instead of load

@TnCoders
Copy link
Author

The version im pulling is the right version ??? How can i get the last version or what is version i should use ?

@freekmurze
Copy link
Member

The latest version is 3.1.0. Your composer show output indicates that your on 3.0.1.

Run composer update to install the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants