Skip to content

Instantly share code, notes, and snippets.

@devmsh
Created February 16, 2020 19:59
Show Gist options
  • Save devmsh/1df6e3cfd42cb3174e0ccdd289496af9 to your computer and use it in GitHub Desktop.
Save devmsh/1df6e3cfd42cb3174e0ccdd289496af9 to your computer and use it in GitHub Desktop.
Write better Laravel tests
<?php
class LoanController extends Controller
{
public function store(Request $request)
{
return Loan::log(array_merge($request->all(), [
'user_id' => Auth::id(),
]));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment