Return to homepage

Comments

Sarder

Hi,

How did you created a new table without any error? I get user table already exists. Also there is a long key error for the new table. But seems like you didn't got that.

May I know how? Please.

  • 0
Muakasa

It s not working i get the following message: "Class App\Repositories\TaskRepository does not exist"

Can someone help me please.

TaskController top:

namespace App\Http\Controllers;

use Illuminate\Http\Request; use App\Task; use App\Repositories\TaskRepository;

class TaskController extends Controller { protected $taskrepository;

1public function __construct(TaskRepository $taskrepository){
2 $this->middleware('auth')->except(['login', 'register']);
3 $this->tasks = $taskrepository;
4
5}

TaskRepository :

namespace App\Repositories;

use App\User;

Class TaskRepository

{ public function forUser(User $user){

1 return $user->user()->task()->latest()->get();
2}

}

  • 0