0

I have created a project in Laravel framework using MySql database and it's quite good. Can we make a build of Laravel and deploy it on the server like the way we do in .net

So that no one can make changes to our code even after accessing the server, Is it feasible to compile the project in PHP-Laravel?

  • i think that's what a `git repository` would do for you (without the database data). – N69S Aug 09 '19 at 15:21
  • If one has access to the server can read and change your php code. – dparoli Aug 09 '19 at 15:25
  • if is a linux box, only give access to apache or www-data user and only root and the web-server user will have access to change the files. – Vidal Aug 09 '19 at 15:26
  • @N69S I think I didn't explain well, just updated my question. The point is "Through that build, no one would be able to make changes in our code like in angular 5 as well", it minifies the entire project to few files and we deploy it to server. – Tarun Narula Aug 09 '19 at 15:27
  • 2
    you want to compile the project? – Vidal Aug 09 '19 at 15:28
  • Actually, I am about to deploy my code to another server, the Second party will have full access to edit my code – Tarun Narula Aug 09 '19 at 15:28
  • @Vidal Exactly you got me – Tarun Narula Aug 09 '19 at 15:29
  • 1
    this SO post can give you some help and options... https://stackoverflow.com/questions/1408417/can-you-compile-php-code-and-upload-a-binary-ish-file-which-will-just-be-run – Vidal Aug 09 '19 at 15:32

1 Answers1

4

PHP is an interpreted language. The binary that lets you interpret PHP is compiled, but what you write is interpreted.

So you can't compile it like you would do in .NET