hexagonal-laravel-experiment icon indicating copy to clipboard operation
hexagonal-laravel-experiment copied to clipboard

Any updates for Laravel 5

Open EHLOVader opened this issue 9 years ago • 4 comments

Is there any reason this wouldn't work with Laravel 5 as is? I think that it will but could see some benefit from validation through Requests and possibly route model binding?

Would these or other new things fit into the hexagonal structure? am I confused?

EHLOVader avatar May 07 '15 17:05 EHLOVader

I too am interested in this, having not yet looked at how Laravel 5 "decides" you should structure your app.

ilumos avatar May 09 '15 14:05 ilumos

I found this looking at Indatus/blacksmith

I also found that in Laravel5 folders have moved as well as some other minor changes in the classes on some things.

I would like to investigate those changes through blacksmith and the templates provided there and also find a way to append routes and inject route model binding with their tool.

Hopefully the route model binding and the new request validation aren't too far out of scope of hexagon structure. I would like start using it in future projects but don't think I want to lose those from my workflow. On May 9, 2015 10:59 AM, "ilumos" [email protected] wrote:

I too am interested in this, having not yet looked at how Laravel 5 "decides" you should structure your app.

— Reply to this email directly or view it on GitHub https://github.com/brianwebb01/hexagonal-laravel-experiment/issues/7#issuecomment-100501522 .

EHLOVader avatar May 09 '15 18:05 EHLOVader

Read up more on things, I see why binding isn't a thing. The use of repositories makes sense too. Would be interested if Requests would be useful still.

EHLOVader avatar May 10 '15 00:05 EHLOVader

Still interested in making this work for Laravel 5. Moving things around I believe I was able to make it happen. However I am still curious if FormRequest could fit in, or any ValidatesWhenResolved holds a place in hexagonal architecture.

I think the ability for FormRequests to handle forbidden and authentication related errors is a strong feature that isn't explicitly handled in these examples. It also seems to be a direct replacement for previous validation techniques like ardent.

EHLOVader avatar Jun 01 '15 16:06 EHLOVader