How to run Laravel project in browser using VS Code - laravel

I have an existing Laravel project, which I want to run in my browser, using VS Code. How do I do this?

There's a built-in terminal in vs code (on a different tab somewhere in the bottom), you can use it to serve your project by a local webserver, with the following command:
php artisan serve
After that you can see your project in your browser (localhost:8000 by default).
Please note this might not work out of the box on Windows.

Related

Layout does not load when creating a new tool in Laravel Nova

When I create a tool in Laravel Nova with
php artisan nova:tool drehimself/test-tool
And then add in NovaServiceProvider.php in the function tools, should appear a layout where showed a black hole. Only that when I press the option that appears in the menu on the left side, it shows nothing, not even the url changes.
Does anyone know what it could be?
Nova tools are customizable, as they primarily consist of a single-file Vue component that is totally under your control. Within your Vue component, you are free to make HTTP requests to any controller within your application.
By default the page should come with the address and a default layout like this. Image But when I do the artisan, mine doesn't look like this
You need to compile your assets first.
Go to your tool :
cd nova-components/TestTool
Then :
# Compile your assets for local development...
npm run dev
# Compile and minify your assets...
npm run prod
In addition, you may run the NPM watch command to auto-compile your assets when they are changed:
npm run watch
Refresh, you will see your tool now.

Vue js Development Code is Working fine but Production build Gives Blank white screen on Opening

Developers Recently i am working on a vue js Website, and everything is working fine on Development but when i build the code using npm run build , the production build gets successfully build but when i try to open the index.html file inside dist directory the file gets opened in Browser but a Blank white page gets Displayed.
You need to start your server, not open the file directly.
Because Vue builds files and connects JS and CSS like it would be on the server.
And now, when you are opening the file, it can't find JS/CSS.
How do you want to deploy your app? I think the following post can help you:
How to deploy vue app
Please check if you have a vue.config.js file and if the configuration is correct according to your project setup.

I am trying to open Nova and getting directories instead of welcome page

I have set-up a Laravel-Nova project. And when i try to open this URL (htttps://localhost/81/App/nova) it opens up this folders directory instead of opening nova/login page.
I have followed all the instructions but still it's not getting resolved.
I have tried looking for solution of it but didn't find anything.
Use php artisan serve in your Terminal and then go to http://127.0.0.1:8000/nova or any link which is getting generated by your terminal. THANKS!

How do you serve your HTML on the browser?

I'm a web developer I recently got my computer wiped last week and now I'm downloading everything that I used to have. I'm starting a new project and I was trying to serve locally on the chrome browser with:
static .
but that command doesn't work for me anymore in the command prompt.
so I have to do this command:
start {file address}
so if I wanted to serve my HTML template I'd have to do this
start C:\dev\React-Basics\src\index.html
Does anybody know how I can fix this so I can use static . ?
It sound as if you had a simple node package to serve your files, perhaps node-static or something else.

How to configure phpStorm (with XAMPP and Xdebug) to display/render the web page in the browser when In RUN it

GOAL: I'm trying to view the .php page I've edited and "run" the php page.
FYI to avoid conflicts with Skype, I reset the port for XAMPP from 80 to 8080
UPDATED: SYMPTOMS
When I click on RUN I just get the html/php of the page displayed with "result 0"
If i manually browse to the page (//localhost:8080//phpStorm/php_test.php) it runs correctly on the server displaying correctly in the browser.
If I Debug that works correctly too (I had to install Xdebug and configure the php ) (lthough it doesn't automatically display and render the page in the browser.
If I Run the page then it does not load the browser.
I installed xampp (although had to set it to use port 8080 b/c of a port conflict) and it works fine.
BUT I can't figure out what configuration to use in phpStorm.
Here's a Screencast of the problem
WHAT I TRIED
I followed the instructions at the page below and it still doesn't work. I get the same results as above or (if I modify the configuration) phpStorm launches the browser and tries to display my .php page as if it were in the httdoc\ directory. (The Help file made it seem like phpStorm was supposed to copy the file to that directory, but it's not.
http://confluence.jetbrains.com/display/PhpStorm/Installing+and+Configuring+XAMPP+with+PhpStorm+IDE

Resources