/** * Tests the update function in the PaymentController * @param void * @return void */ public function testDestroy() { $this->withoutMiddleware(); $this->call('POST', '/payment', $this->paymentData); $paymentStored = Payment::orderBy('id', 'desc')->first(); $paymentStored->delete($paymentStored->id); $this->assertEquals(Payment::all()->count(), 0); }
/** * @Get("/profile/{id}/payments", as="profiles.payments") */ public function transactionShow() { $transactions = Payment::all(); return view('transaction.show', compact('transactions')); }