nahid / talk

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

App\Http\Controllers\Talk not found #60

Closed packytagliaferro closed 7 years ago

packytagliaferro commented 7 years ago

Any reason I would get this error? I made a MessageController like so:

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class MessageController extends Controller
{

  public function __construct()
  {
      Talk::setAuthUserId(auth()->user()->id);
  }

    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
      $inboxes = Talk::getInbox();

      return $inboxes;
    }

In my config\app I added

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

in the aliases so not sure why I am getting that error.

packytagliaferro commented 7 years ago

Adding use Nahid\Talk\Facades\Talk; made it work in my MessageController.php