app/Http/Controllers/BarangController.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()
    {
        return view('barang.index',[
            "barang" => Barang::orderBy('created_at','DESC')->get()
        ]);
    }
public function index ( ) { return view ( 'barang.index' , [ " barang " => Barang :: orderBy ( 'created_at' , 'DESC' ) -> get ( ) ] ) ; }
Display a listing of the resource.
Display a listing of the resource .