How to integrate and run php in existing vue app in the same local host?












0















I have build an app with vue (not with vue cli). I ran It on my local host. What I am trying to do is to add php in this Project. But I cannot run php and vue on the same local host together. Is there a way to solve this problem ?



I know when the app is created with command line interface you can compile them with webpack. But how to combine back-end and front-end together when the app is created with vue?



Thanks a lot in advance










share|improve this question

























  • It is not possible to write php directly in a vue. Either you create an API using PHP or you use Laravel

    – keysl
    Nov 13 '18 at 9:54













  • you may need to create RESFUL API for php application as back end and vue js as front end application. or you can use laravel with vue but i think you just need to modify php application for that

    – channasmcs
    Nov 13 '18 at 10:28













  • Thanks for your answer. But I want to get the data of form which is on vue template. Must I do It with API?

    – Abdulwasa
    Nov 13 '18 at 10:43











  • Yes, you have to pass the form values from vue thru API to php

    – Chris shi
    Nov 13 '18 at 10:51


















0















I have build an app with vue (not with vue cli). I ran It on my local host. What I am trying to do is to add php in this Project. But I cannot run php and vue on the same local host together. Is there a way to solve this problem ?



I know when the app is created with command line interface you can compile them with webpack. But how to combine back-end and front-end together when the app is created with vue?



Thanks a lot in advance










share|improve this question

























  • It is not possible to write php directly in a vue. Either you create an API using PHP or you use Laravel

    – keysl
    Nov 13 '18 at 9:54













  • you may need to create RESFUL API for php application as back end and vue js as front end application. or you can use laravel with vue but i think you just need to modify php application for that

    – channasmcs
    Nov 13 '18 at 10:28













  • Thanks for your answer. But I want to get the data of form which is on vue template. Must I do It with API?

    – Abdulwasa
    Nov 13 '18 at 10:43











  • Yes, you have to pass the form values from vue thru API to php

    – Chris shi
    Nov 13 '18 at 10:51
















0












0








0








I have build an app with vue (not with vue cli). I ran It on my local host. What I am trying to do is to add php in this Project. But I cannot run php and vue on the same local host together. Is there a way to solve this problem ?



I know when the app is created with command line interface you can compile them with webpack. But how to combine back-end and front-end together when the app is created with vue?



Thanks a lot in advance










share|improve this question
















I have build an app with vue (not with vue cli). I ran It on my local host. What I am trying to do is to add php in this Project. But I cannot run php and vue on the same local host together. Is there a way to solve this problem ?



I know when the app is created with command line interface you can compile them with webpack. But how to combine back-end and front-end together when the app is created with vue?



Thanks a lot in advance







php vue.js frontend backend






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 13 '18 at 12:33









Chris shi

1531110




1531110










asked Nov 13 '18 at 9:50









AbdulwasaAbdulwasa

12




12













  • It is not possible to write php directly in a vue. Either you create an API using PHP or you use Laravel

    – keysl
    Nov 13 '18 at 9:54













  • you may need to create RESFUL API for php application as back end and vue js as front end application. or you can use laravel with vue but i think you just need to modify php application for that

    – channasmcs
    Nov 13 '18 at 10:28













  • Thanks for your answer. But I want to get the data of form which is on vue template. Must I do It with API?

    – Abdulwasa
    Nov 13 '18 at 10:43











  • Yes, you have to pass the form values from vue thru API to php

    – Chris shi
    Nov 13 '18 at 10:51





















  • It is not possible to write php directly in a vue. Either you create an API using PHP or you use Laravel

    – keysl
    Nov 13 '18 at 9:54













  • you may need to create RESFUL API for php application as back end and vue js as front end application. or you can use laravel with vue but i think you just need to modify php application for that

    – channasmcs
    Nov 13 '18 at 10:28













  • Thanks for your answer. But I want to get the data of form which is on vue template. Must I do It with API?

    – Abdulwasa
    Nov 13 '18 at 10:43











  • Yes, you have to pass the form values from vue thru API to php

    – Chris shi
    Nov 13 '18 at 10:51



















It is not possible to write php directly in a vue. Either you create an API using PHP or you use Laravel

– keysl
Nov 13 '18 at 9:54







It is not possible to write php directly in a vue. Either you create an API using PHP or you use Laravel

– keysl
Nov 13 '18 at 9:54















you may need to create RESFUL API for php application as back end and vue js as front end application. or you can use laravel with vue but i think you just need to modify php application for that

– channasmcs
Nov 13 '18 at 10:28







you may need to create RESFUL API for php application as back end and vue js as front end application. or you can use laravel with vue but i think you just need to modify php application for that

– channasmcs
Nov 13 '18 at 10:28















Thanks for your answer. But I want to get the data of form which is on vue template. Must I do It with API?

– Abdulwasa
Nov 13 '18 at 10:43





Thanks for your answer. But I want to get the data of form which is on vue template. Must I do It with API?

– Abdulwasa
Nov 13 '18 at 10:43













Yes, you have to pass the form values from vue thru API to php

– Chris shi
Nov 13 '18 at 10:51







Yes, you have to pass the form values from vue thru API to php

– Chris shi
Nov 13 '18 at 10:51














1 Answer
1






active

oldest

votes


















0














You Need to create Rest API for VueJS and PHP. There is no other solution. follow the links below as per your need.




  1. Here is the Github Link for the Same


  2. You can also use Laravel framework with Vue







share|improve this answer



















  • 1





    Thank you guys. I did It

    – Abdulwasa
    Nov 13 '18 at 14:32











  • well done, please accept the answer by click check icon.

    – Sayed Mohd Ali
    Nov 13 '18 at 14:35











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53278187%2fhow-to-integrate-and-run-php-in-existing-vue-app-in-the-same-local-host%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














You Need to create Rest API for VueJS and PHP. There is no other solution. follow the links below as per your need.




  1. Here is the Github Link for the Same


  2. You can also use Laravel framework with Vue







share|improve this answer



















  • 1





    Thank you guys. I did It

    – Abdulwasa
    Nov 13 '18 at 14:32











  • well done, please accept the answer by click check icon.

    – Sayed Mohd Ali
    Nov 13 '18 at 14:35
















0














You Need to create Rest API for VueJS and PHP. There is no other solution. follow the links below as per your need.




  1. Here is the Github Link for the Same


  2. You can also use Laravel framework with Vue







share|improve this answer



















  • 1





    Thank you guys. I did It

    – Abdulwasa
    Nov 13 '18 at 14:32











  • well done, please accept the answer by click check icon.

    – Sayed Mohd Ali
    Nov 13 '18 at 14:35














0












0








0







You Need to create Rest API for VueJS and PHP. There is no other solution. follow the links below as per your need.




  1. Here is the Github Link for the Same


  2. You can also use Laravel framework with Vue







share|improve this answer













You Need to create Rest API for VueJS and PHP. There is no other solution. follow the links below as per your need.




  1. Here is the Github Link for the Same


  2. You can also use Laravel framework with Vue








share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 13 '18 at 10:03









Sayed Mohd AliSayed Mohd Ali

1,0621318




1,0621318








  • 1





    Thank you guys. I did It

    – Abdulwasa
    Nov 13 '18 at 14:32











  • well done, please accept the answer by click check icon.

    – Sayed Mohd Ali
    Nov 13 '18 at 14:35














  • 1





    Thank you guys. I did It

    – Abdulwasa
    Nov 13 '18 at 14:32











  • well done, please accept the answer by click check icon.

    – Sayed Mohd Ali
    Nov 13 '18 at 14:35








1




1





Thank you guys. I did It

– Abdulwasa
Nov 13 '18 at 14:32





Thank you guys. I did It

– Abdulwasa
Nov 13 '18 at 14:32













well done, please accept the answer by click check icon.

– Sayed Mohd Ali
Nov 13 '18 at 14:35





well done, please accept the answer by click check icon.

– Sayed Mohd Ali
Nov 13 '18 at 14:35


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53278187%2fhow-to-integrate-and-run-php-in-existing-vue-app-in-the-same-local-host%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Florida Star v. B. J. F.

Error while running script in elastic search , gateway timeout

Adding quotations to stringified JSON object values