---
title: "Comment by Jaska on \"Adding a Laravel backend to a Remix App\" | Hashnode"
description: "Nicely written guide, thanks. But as a seasoned programmer, I&#39;m a bit worried about writing the backend code twice. In the pure remix code you access the da"
url: "https://hashnode.com/posts/adding-a-laravel-backend-to-a-remix-app/62a874fa0baf4306d9493798/comment/63cf8bc91819c3d44449cca5"
---

[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)

[Jaska](https://hashnode.com/@jaskajanis)

[Jan 24, 2023](https://hashnode.com/posts/adding-a-laravel-backend-to-a-remix-app/62a874fa0baf4306d9493798/comment/63cf8bc91819c3d44449cca5)

Nicely written guide, thanks. But as a seasoned programmer, I'm a bit worried about writing the backend code twice. In the pure remix code you access the database directly with Prisma and in the PHP backend you do it again using Laravel.

In real life you usually have more complicated business logic on your server. You might write an audit log entry for each GET request or have some other side effects on the server. That's why you write actions/operations on your backend only once so that none of the business logic rules are forgotten.

So wouldn't I need to write all the backend using remix/javascript OR always make API calls from the remix backend loaders?

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

[Mar 5, 2023](https://hashnode.com/posts/adding-a-laravel-backend-to-a-remix-app/62a874fa0baf4306d9493798/comment/63cf8bc91819c3d44449cca5#reply-6404875287595bb6fc8849ee)

Hi [Jaska](https://hashnode.com/@jaskajanis),

I'm sorry if the article wasn't clear!

The examples in this article of Remix talking to the database directly were how I did things before adding the Laravel backend. Now the all the Remix loaders do is call the API for my Laravel backend.

So I only write the backend code once for exactly the reasons you mentioned.

Hopefully that clears things up!
