View and controllers on different machines in Laravel

Kevin Joymungol

I have got a requirement from a customer that my web UI should not have any direct access to my database. My web app is built in php using the Laravel framework and Eloquent. One option is rewriting the code in my controller and model into a webservice (in any other language be it php or java) and calling the webservice from the UI, but this will involve tremendous work. Is there any way in Laravel where I can move my controller and model to another server and calling the controller from UI via Laravel routes? The view must be on one machine and the model-controller on another machine.

Keith Mifsud

To the best of my knowledge this cannot work. Although Laravel is highly customisable, the work involved in moving your entire application to a new server while keeping the view where they are is extremely too much and possibly won't work.

Your suggestion to use web services is something to consider but in reality you will be creating a static website in one server which uses API's to talk to Laravel on a other servers. They will not be views and definitely not in blade templates. Remember that you have other UI related dependencies in vendor and public directories.

My suggestion is to have the DB on a separate server which you can connect to by editing the config files - this is a very normal setup.

Then if you want you can create some web pages which use the API to talk to Laravel from another server but again I cannot see why this would be needed as the views are still not accessible by anyone other than the server.

Please let me know if I'm missing something :)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Multiple view controllers with different orientations

From Dev

2 different controllers in abstract view

From Dev

Multiple view controllers with different orientations

From Dev

laravel public variable for different controllers

From Dev

Laravel reuse URIs with different controllers

From Dev

iOS - different screen orientations for different view controllers

From Dev

Different controllers in different files for ng-view

From Dev

Using 2 different View Controllers in a UIPageViewController as Pages

From Dev

Set status bar colour for different view controllers

From Dev

Proceed to different view controllers based on boolean value

From Dev

how to reach model from different view controllers?

From Dev

Pass data from different controllers to one view

From Dev

Swift - Access different View Controllers in App Delegate

From Dev

Return back to different controllers from one view

From Dev

Array Data Through Different View Controllers Swift

From Dev

Laravel routes same url different controllers

From Dev

Is it possible to add the same view to two different view controllers?

From Dev

RestKit Mapping for different web services in different view controllers

From Dev

AVAudioPlayer stop all sounds playing on different view controllers

From Dev

Unable to solve the 'NSUnknownKeyException' error if view controllers are in a library and storyboard in different project

From Dev

A button which navigates to different view controllers depending on the condition

From Dev

How to navigate to different view controllers based on slide out menu

From Dev

Reload and not reload if press back from different view controllers. Swift

From Dev

Show many action from different controllers in one view Symfony

From Dev

How To Pass Data Between View Controllers On Different Storyboards?

From Dev

Fastest way to direct users to different view controllers at the start of an app

From Dev

Swift - Use segmented control to navigate to different view controllers

From Dev

Cocoa: Load Different View Controllers depending on input from App Delegate

From Dev

How to navigate to different view controllers based on slide out menu

Related Related

  1. 1

    Multiple view controllers with different orientations

  2. 2

    2 different controllers in abstract view

  3. 3

    Multiple view controllers with different orientations

  4. 4

    laravel public variable for different controllers

  5. 5

    Laravel reuse URIs with different controllers

  6. 6

    iOS - different screen orientations for different view controllers

  7. 7

    Different controllers in different files for ng-view

  8. 8

    Using 2 different View Controllers in a UIPageViewController as Pages

  9. 9

    Set status bar colour for different view controllers

  10. 10

    Proceed to different view controllers based on boolean value

  11. 11

    how to reach model from different view controllers?

  12. 12

    Pass data from different controllers to one view

  13. 13

    Swift - Access different View Controllers in App Delegate

  14. 14

    Return back to different controllers from one view

  15. 15

    Array Data Through Different View Controllers Swift

  16. 16

    Laravel routes same url different controllers

  17. 17

    Is it possible to add the same view to two different view controllers?

  18. 18

    RestKit Mapping for different web services in different view controllers

  19. 19

    AVAudioPlayer stop all sounds playing on different view controllers

  20. 20

    Unable to solve the 'NSUnknownKeyException' error if view controllers are in a library and storyboard in different project

  21. 21

    A button which navigates to different view controllers depending on the condition

  22. 22

    How to navigate to different view controllers based on slide out menu

  23. 23

    Reload and not reload if press back from different view controllers. Swift

  24. 24

    Show many action from different controllers in one view Symfony

  25. 25

    How To Pass Data Between View Controllers On Different Storyboards?

  26. 26

    Fastest way to direct users to different view controllers at the start of an app

  27. 27

    Swift - Use segmented control to navigate to different view controllers

  28. 28

    Cocoa: Load Different View Controllers depending on input from App Delegate

  29. 29

    How to navigate to different view controllers based on slide out menu

HotTag

Archive