<?php

namespace App\Http\Controllers;

use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\Auth;
use App\models\Order;

class CheckoutController extends BaseController
{
    public function index(){
        return view('products');
    }
    public function add_to_cart(){
        
    }
    public function checkout(){
        if(Auth::user()){
            if(Auth::user()->hasRole('Admin')){
                return response()->json([
                    'status' => false,
                    'message' => 'Please logout our Admin panel',
                ], 400);
            }else{
                
            }

        }else{
            return response()->json([
                'status' => false,
                'message' => 'Please log in to your accout',
            ], 400);
        }
   }
   public function placeOrder(){
        
   }
}
