Esempio n. 1
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $data = Akun::find($id)->toArray();
     $tipeakuns = TipeAkun::all()->toArray();
     $currencies = MataUang::all()->toArray();
     return view('akun.edit', compact('data', 'tipeakuns', 'currencies'));
 }
Esempio n. 2
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $perusahaan = Perusahaan::first();
     $mata_uangs = MataUang::get();
     if ($perusahaan == null) {
         $perusahaan = new Perusahaan();
     }
     return view('perusahaan.create', compact('perusahaan', 'mata_uangs'));
 }
Esempio n. 3
0
 /**
  * Nampilin tampilan bikin kurs harian.
  *
  * @return Response
  */
 public function kurs()
 {
     // $default_mata_uang = Perusahaan::first()->mata_uang;
     $default_mata_uang = 'IDR';
     // $mata_uangs = MataUang::where('simbol', '!=', $default_mata_uang);
     // $mata_uangs = $mata_uangs->get();
     $mata_uangs = MataUang::get();
     return view('currency.kurs', compact('mata_uangs', 'default_mata_uang'));
 }
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::create('mata_uangs', function (Blueprint $table) {
         $table->string('simbol');
         $table->string('nama');
         $table->string('negara');
         $table->primary('simbol');
     });
     MataUang::create(['simbol' => 'IDR', 'nama' => 'Rupiah', 'negara' => 'Indonesia']);
 }