---
title: "Comment by Micheal Mand on \"Adding a Laravel backend to a Remix App\" | Hashnode"
description: "If you don&#39;t need the features of a controller (the only one I can really think of is common middleware per Controller, but you can do the same thing with a"
url: "https://hashnode.com/posts/adding-a-laravel-backend-to-a-remix-app/62a874fa0baf4306d9493798/comment/62b0bccf5abe3c6b79d140ef"
---

[Discussion](https://hashnode.com/posts/adding-a-laravel-backend-to-a-remix-app/62a874fa0baf4306d9493798)

Comment [Adding a Laravel backend to a Remix App](https://hashnode.com/posts/adding-a-laravel-backend-to-a-remix-app/62a874fa0baf4306d9493798)

[Micheal Mand](https://hashnode.com/@mikemand)

[Jun 20, 2022](https://hashnode.com/posts/adding-a-laravel-backend-to-a-remix-app/62a874fa0baf4306d9493798/comment/62b0bccf5abe3c6b79d140ef)

If you don't need the features of a controller (the only one I can really think of is common middleware per Controller, but you can do the same thing with a route group), you can use Closures in your routes. Since Laravel 8 there is no impact on route caching and it eliminates half the code you have to write in Laravel.

I have slowly gotten rid of using Controllers for things that don't need a controller, like getting all users (hopefully you plan to paginate this, or already have and just simplified it for this blog post?) or displaying a simple view (Route::view is my best friend for all of those required static pages like Policies, Terms & Conditions, etc.

[Dave Calnan](https://hashnode.com/@davecalnan)

[Jun 20, 2022](https://hashnode.com/posts/adding-a-laravel-backend-to-a-remix-app/62a874fa0baf4306d9493798/comment/62b0bccf5abe3c6b79d140ef#reply-62b0e4895abe3c6b79d1457c)

Route::view() is great! I also really like closures for simple stuff just like that e.g. a health check endpoint that just needs to return a 200 OK.

In my actual controllers I would paginate and use Form Requests/JSON Resources, authorisation etc - just wanted to keep that example simple and comparable to the Prisma one!
