bestmomo's avatar

Lumen play

I've started to play with Lumen with a little application with AngularJS that I made previously with Laravel. As I needed complete authentication I added illuminate/mail component to Lumen for password reset. After some struggle I got it working and you can find the result there.

Hope it helps !

0 likes
8 replies
rvanhoof's avatar

@bestmomo Just a quick tip looking at the repository...

When you want to output JSON from your controller methods, you use something like this:

return response()->json(['result' => 'success']);

Are you aware that Lumen / Laravel automatically converts return values to JSON if the return value is an array?

return ['result' => 'success'];

This would yield the exact same result.

1 like
bashy's avatar

@rvanhoof Possible, maybe you'd want header info included which is why you may use response stuff. But if it's just plain JSON, yeah.

rvanhoof's avatar

@bashy True for custom headers, although the content-type → application/json header will be set automatically.

bashy's avatar

Yeah, I was thinking other than Content-Type.

Please or to participate in this conversation.