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

Cannot declare class Pingpong\Presenters\Model because the name is already in use #10

Closed
noxify opened this issue Oct 21, 2014 · 1 comment

Comments

@noxify
Copy link
Contributor

noxify commented Oct 21, 2014

Hi,

after running

composer update

with the following response:

composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Removing pingpong/presenters (1.0.2)
  - Installing pingpong/presenters (1.0.3)
    Downloading: 100%         

Writing lock file
Generating autoload files
Generating optimized class loader

I got the error message:

Cannot declare class Pingpong\Presenters\Model because the name is already in use

This message prompts even when I try to open the pages/articles in the admin panel.

Log file:

[2014-10-21 20:31:24] production.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Cannot declare class Pingpong\Presenters\Model because the name is already in use' in /Applications/MAMP/htdocs/ping-admin/vendor/pingpong/presenters/src/Pingpong/Presenters/Model.php:5
Stack trace:
#0 [internal function]: Illuminate\Exception\Handler->handleShutdown()
#1 {main} [] []
@noxify
Copy link
Contributor Author

noxify commented Oct 21, 2014

To solve this problem, you have to update the file:

vendor/pingpong/src/PingPong/Presenters/Model.php

with the following

<?php namespace Pingpong\Presenters;
//OLD
// use Illuminate\Database\Eloquent\Model;
// class Model extends Model implements PresentableInterface {

//NEW
use Illuminate\Database\Eloquent\Model as EloquentModel;
class Model extends EloquentModel implements PresentableInterface {

    use PresentableTrait;

}

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

1 participant