app/Http/Controllers/DrugController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index()
    {
        $suppliers = Supplier::all();
        $drug_types = DrugType::all();
        $drugs = Drug::with('supplier','drug_type')->simplePaginate(100);
        return view('pages.pharmacy.index')
            ->with('suppliers',$suppliers)
            ->with('drug_types',$drug_types)
            ->with('drugs',$drugs);
    }
public function index ( ) { $ suppliers = Supplier :: all ( ) ; $ drug_types = DrugType :: all ( ) ; $ drugs = Drug :: with ( 'supplier' , 'drug_type' ) -> simplePaginate ( 100 ) ; return view ( 'pages.pharmacy.index' ) -> with ( 'suppliers' , $ suppliers ) -> with ( 'drug_types' , $ drug_types ) -> with ( 'drugs' , $ drugs ) ; }
Display a listing of the resource.
Display a listing of the resource .
//        return $drugs;