So I have this model "Task" with its controller and views, and when I click edit on a task it keeps giving me Undefined variable.
This is my edit function:
  public function edit(Task $task)
    {
        return view('tasks.edit', [
            compact('task'),
            'project' => Project::all(),
            'client' => Client::all(),
        ]);
    }
This is the view I call in the function above:
 @extends('layouts.app')
@section('content')
    <form method="POST" action="{{route('tasks.update',$task)}}">
        @method('PUT')
    @include('tasks.form')
    </form>
@endsection 
In the form is where it gives me the error. I've realle been trying to see what is wrong but I don't know.
Thanks in advance.
