11 months ago

Auth not found issue

Posted 11 months ago by hasibweb

I am getting the following error.

Auth not found

Here is my code-


namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Exceptions\InputException;

class OrderController extends Controller {

    public function index(Request $request) 
        $user = Auth::user();
        $productId = $request->route('productId');

        $product = Product::where('id', $productId)->first();

        return $product;

What wrong I did?

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