from Hacker News

Goravel: A Go framework inspired by Laravel

by cgg1 on 3/9/25, 6:35 AM with 161 comments

  • by liampulles on 3/9/25, 11:22 PM

    At my last job I wrote web services using Spring (Java enterprise stuff). That was how I and a lot of my colleagues first learned how to write enterprise code: via lots of annotations.

    Then I discovered Go and learned a different way to make systems. At first it was strange - where was the IoC framework? How do I build up my db entities?

    And then I got into the philosophy of Go: how its better to make things that are clear rather than clever, and how its better to do things with an obvious control flow. In my current Go job, we wire singletons manually, build up our http server manually, and write raw SQL. It works gangbusters.

    Please lets keep Go raw and simple.

  • by voodooEntity on 3/9/25, 9:30 AM

    Some time ago i wrote a short blog article about getting started with goravel - might be interresting:

    https://blog.laughingman.dev/article/Building_a_simple_demo_...

  • by Daril on 3/9/25, 9:55 AM

    I'm not a fan of the complexity added by this and other similar frameworks. PHP and Go are very different languages, so trying to replicate the same concepts for one language to another I don't think it is a good idea.

    One of the things I would discard would be the use of an ORM library : every library adds another level of complexity and doesn't allow to see what is happening when the SQL statements are built. In my opinion, it is better to create some simple methods for each object that implement the CRUD operations and build the SQL statements directly.

    It is possible to write a web application with GO using only some libraries, for example for routing and authentication.

    My favorite place to start is Autostrada : https://autostrada.dev/

  • by mkl95 on 3/9/25, 11:14 AM

    It seems like every middling company out there wants to bolt in popular architecture from other languages into Go, particularly Java enterprise patterns. Why not use the actual language or framework your engineers like instead?
  • by adamors on 3/9/25, 9:03 AM

    Never got the point of porting X framework from Y language in order to

    > simplifying the learning curve for Y language developers

    You'll just end up writing the same old patterns in the new language as you did in the old one.

    Especially with Go, it's really easier to adopt the existing tooling (most of which is in the standard lib) than to port whatever concepts Laravel/PHP had.

  • by JadoJodo on 3/9/25, 2:32 PM

    I love Go and I love Laravel, but I do find the naming an odd choice; it seems like borrowed clout. Especially so when Laravel's own name is a soft reference to the work of C.S. Lewis. Why not pick a unique, "Go-esque" name and still nod to Laravel in the title/description?
  • by leetrout on 3/9/25, 8:36 PM

    It's one thing to have MVC in Go. It's quiet another to match the productivity boost Laravel (or Rails or Django) give you. Admirable attempt... the docs don't say much on the template support in the views but I would imagine there's not a 1:1 with Blade yet.
  • by myflash13 on 3/9/25, 1:10 PM

    What I’ve really wanted is a Laravel-like framework in Rust.
  • by pknerd on 3/9/25, 9:52 AM

    Wow, wow, wow!

    As someone who loves both Laravel and Go, this is a Godsend! I would get back to Go only for using this!

  • by pooingcode on 3/10/25, 7:54 AM

    Your cookie banner was the worst I’ve ever seen on any site. It has 100s of ad venders.
  • by DeathArrow on 3/9/25, 8:16 AM

    For someone who doesn't know Laravel it's worth explaining it a bit further.
  • by juwjfoobar on 3/9/25, 9:33 PM

    The session interface is missing WithContext(ctx context.Context) unless something else is making it context aware
  • by begueradj on 3/9/25, 11:07 AM

    A similar path was taken in the Node.js world, but it seems the framework in question (AdonisJs) is far from being that successful.

    Given the standard batteries included in Go, I think there is even less chess for this to succeed.

    But still that is a good thing to try. Why not. All the best.

  • by zsoltkacsandi on 3/9/25, 9:04 AM

    IMO there is definitely a place and need for such a framework in the Go ecosystem, but that does not mean that the whole API, structure and terminology need to be copied from Laravel as is. This will definitely hinder adoption.
  • by gren236 on 3/9/25, 11:46 AM

    Well, someone would've made this at some point anyway. I don't get why people tend to bring stuff from other languages to Go, but it's better to have something than not I guess...
  • by capitanazo77 on 3/10/25, 2:02 AM

    Congratulations! Php is the weakest part of laravel.

    Please add inertia. It will make it extremely productive!

  • by ulrischa on 3/9/25, 2:05 PM

    Why not ust use Laravel itself? You can put it on the cheapest webhosting plan and go for it
  • by ofrzeta on 3/9/25, 9:43 AM

    While the API seems similar, the syntax of Laravel feels a bit lighter thanks to PHP.
  • by mogaal on 3/9/25, 1:21 PM

    One of the things I love about Laravel is that I can just drop it into share-hosting and forget about it. At the same time, my daily work demands Golang 80% of the time.

    I keep having mix feelings when having this dichotomy

  • by thr0waway001 on 3/9/25, 10:22 PM

    Looking forward to LaRust.
  • by khantsithu on 3/9/25, 12:01 PM

    just use laravel bro
  • by dankobgd on 3/9/25, 11:20 AM

    looks horrible