app/Http/Controllers/MedicineController.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()
    {
        $result = DB::table('medicines')->get();
        $sup = Supplier::all();
        $cat = Category::all();
        return view('medicine.index', compact('result', 'sup', 'cat'));
    }
public function index ( ) { $ result = DB :: table ( 'medicines' ) -> get ( ) ; $ sup = Supplier :: all ( ) ; $ cat = Category :: all ( ) ; return view ( 'medicine.index' , compact ( 'result' , 'sup' , 'cat' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .
//query raw // $result = DB::select(DB::raw('select * from medicines')); // dd($result); //query builder // dd($result); //query orm // $result = Medicine::all(); // dd($result);