V
V
vladimirr892018-05-02 10:49:14
Laravel
vladimirr89, 2018-05-02 10:49:14

How to fix modal window call error?

There is such a code. It is supposed to call a modal window with data

public function getVebinar(Subscribe $subs, $id){
    
    $user = Auth::user();
      $this->data['subsBuh'] = $subs->whereIn('id', [5,6,7,8])->get();
      
      $this->data['subsList'] = [
        ' ',
        'Для бухгалтера' => $this->data['subsBuh']->pluck('NamePrice', 'id')->toArray(),
        ];
    
        return view('ajaxview.modals.vebinar', $this->data)->with('user', $user);
    }

But something goes wrong and gives me an error: Type error: Argument 1 passed to App\Http\Controllers\AjaxController::getVebinar() must be an instance of App\Models\Subs\Subscribe, string given, called in / home/dekoraci/test.dekoracio.by/app/Http/Controllers/AjaxController.php on line 25
Tell me what it wants from me?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Arman, 2018-05-02
@vladimirr89

He tells you: The first argument in the call to the getVebinar() method of the AjaxController class must be an instance of App\Models\Subs\Subscribe. Check how you call getVebinar in the AjaxController class, namely what is in the first argument

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question