<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Models\menu;
use Illuminate\Support\Facades\DB;
use App\Http\Controllers\JsonController;
use App\Models\labour_master;
use App\Models\contrct_or_sup_masters;
use App\Models\purchase_order;
use App\Models\po_assign;

use App\Models\item_master;
use App\Models\suplier_prdtcs;
use App\Models\bill_submisson;
use App\Models\payment_master;
//use App\Models\events;
use Carbon\Carbon;
use Session;
use Response;
class FlutterController extends Controller
{

   

    /**
     * Create a new controller instance.
     *
     * @return void
     */
    public function __construct()
    {
        $this->middleware('auth');
    }

    /**
     * Show the application dashboard.
     *
     * @return \Illuminate\Contracts\Support\Renderable
     */
    public function index()
    {
      
        $JsonController = new JsonController;

        // Access method in JsonController
        $JsonController->test1();
    

      
        
        return view('home');
    } 



    public function check_login()
    {
      
 
        $data = DB::table('contrct_or_sup_masters AS A')
        ->select('A.c_id', 'A.c_name')->where([['A.status','=','0']])->get();
        return response()->json($data);
    }

}
