nahid / talk

Talk is a real-time users messaging and chatting system for Laravel.
MIT License
1.6k stars 326 forks source link

Class talk does not exist! #125

Closed Nazar0102 closed 6 years ago

Nazar0102 commented 6 years ago

Hi guys! After composer update I got this "Class talk does not exist" I am trying composer dump-autoload but it still not working(

In app/Http/Kernel.php I have

'talk' => \Nahid\Talk\Middleware\TalkMiddleware::class,

In config/app.php in providers section

Nahid\Talk\TalkServiceProvider::class,

and in aliases array

'Talk' => Nahid\Talk\Facades\Talk::class,

What I did wrong? Any idea?

Nazar0102 commented 6 years ago

oh, I see that problem is in the package version. It does't work with laravel"5.5.*"(((

nahid commented 6 years ago

please use dev-master, it will be work

Nazar0102 commented 6 years ago

I'm using "nahid/talk": "dev-master". And everything worked good until I updated composser. Even if I checkout or revert a lot of commits back I still have the same "Class talk does not exist". If I use Nahid\Talk\Talk not Nahid\Talk\Facades\Talk all methods should not be called statically.

Shohan494 commented 6 years ago

Same case, trying to downgrade laravel to 5.3 to have a further check.

iamdatman commented 6 years ago

Am having the same issue

ReflectionException in compiled.php line 1479: Class talk does not exist

Fidelite6 commented 6 years ago

Same issue.

andresgcarmona commented 6 years ago

I did a hotfix setting return \Nahid\Talk\Talk::class; instead of return 'talk'

<?php

namespace Nahid\Talk\Facades;

use Illuminate\Support\Facades\Facade;

class Talk extends Facade
{
    /**
     * Get the registered name of the component.
     *
     * @return string
     */
    protected static function getFacadeAccessor()
    {
        return \Nahid\Talk\Talk::class;
    }
}
Ravenna commented 6 years ago

@andresgcarmona that worked for me. Excited for a release that will solve the issue without a hotfix.

nahid commented 6 years ago

This problem was solved. Please use v2.2.2 or dev-master