icelander
1 year ago
184
12
Laravel

i get this error message saying Class App\Http\Controllers\Thread does not exist

Posted 1 year ago by icelander

this is my AdminController

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Payment;
use Auth;
use App\Notifications\RepliedToThread;
use App\User;
use App\Cart;
use App\Order;
use App\Admin;
use App\mechanic;
use App\FixedPayment;
use App\FinalPayment;
use App\NonRefundable;
use App\MandatoryFee;
use App\likelyproblem;
use App\DiscoveredProblem;
use App\Category;
use App\Transmission;
use App\tranxavcategory;
use App\TranxavDrivers;
use App\TranxavMechanics;
use Session;
use App\Service;
use App\CarModel;
use Illuminate\Support\Facades\Input;
use DB;

and this is my function

public function engage(Request $request,Thread $thread){
    $pay = Session::get('payid');
    $mechs = Session::get('mechanic');
  
    

    if(!is_null($pay)){

      $pay->mergedmechanic=$mechs;
      $pay->assigned=1;
      $pay->save();  
      auth()->user()->notify(new RepliedToThread());
       return redirect(route('admin.assign'))->with('status','Driver merged with mechanic');
   
    }else{
        return redirect(route('admin.assign',['paid'=>$pay]));
   
    }
}
}

but I keep getting this error. what is wrong?

Please sign in or create an account to participate in this conversation.