Laravel 8 artisan serve - laravel-8

When I run my app (laravel 8, jetstream, tailwind ...) on php artisan serve all is working as expected. If I try to access the app over http://localhost/dev/myapp/public I get an error Undefined array key 0. How to fix that?

Laravel should life in the root of you domain, therefore there is php artisan serve command for local development.
If you really want to access the project otherwise, you have to make several adjustments but this is not recommend for local development.

Related

How to use cypress e2e tests with Vue CLI in history mode?

I am trying to run my cypress e2e tests in a Github CI on a Vue 2 SPA using CLI. Locally they work fine when running ./node_modules/.bin/vue-cli-service test:e2e. But navigation inside the testing framework with cy.visit(), e.g. to /login fails inside the CI pipeline with a 404 - requested path not found.
As I am aware, docs state:
Since our app is a single page client side app, without a proper server configuration, the users will get a 404 error if they access http://oursite.com/user/id directly in their browser.
When running the production build manually using npm serve it faces the same struggle. Vue-Routes navigation works as expected, but calling sub-routes fails with a 404. Production with a NginX reverse proxy works as expected.
So:
Why does the dev server work locally when Vue CLI is serving itself?
How to redirect all sub-route requests to index.html for the cypress e2e tests?
Edit: Weird thing is. Running serve ./dist with the silent flag -s fixes the redirection problems completely. Doesn't make sense to me.

shopware app doesn't work in test environment without running build-storefront.js from console?

I have an app for shopware 6 which has a javascript file.
After i upload it to my shopware6 site, install and activate it, it doesn't work unless i run the build-storefront.sh from console.
Is there a way to make the app work without running build-storefront.sh ?
I tested it with shopware 6.4.14.0
All assets like the javascript of your app need to be uploaded inside your app, so the app automatically works without the need to rebuild the storefront after installing your app.
Therefore to create a zip folder for publishing or for uploading you should always execute the build-storefront.sh script, either locally or in a CI step. That command should build all the necessary assets and put them under the Resources/app/storefront/dist folder inside your app.
Please ensure that that folder is included in the zip file you upload to your shop.

After deployment, Vue Nuxt SPA is not correctly displayed even though yarn start does work

summery
I"ve tried to deploy sample Vue Nuxt SPA to AWS S3.
My Sample SPA is correctly displayed in my local Ubuntu20.04 environment with yarn start.
However SPA on S3 does not work correctly and shows error.
I want to know how to deloy correctly and show the same content as I did in my local environment.
what I've tried
Run yarn start
Confirm SPA does work in my local environment.
Run yarn generate.
Deploy /dist to S3.
Configure S3 access rigihts.
Confirm SPA does not work correctly in S3.
show some codes
here is the github repo I've tried.
https://github.com/jpskgc/vue-nuxt-spa-sample/tree/main

How to use Laravel sanctum with Breeze

I have installed Laravel Breeze and then Sanctum. But, it is not working as it should. Please guide me, how can I set up it?
I want to create the admin panel with Laravel Breeze and Vue application for the front users.
For a start you can install Breeze with Vue + Inertia scaffolding unless you're implementing everything by hand using API calls with Sanctum. First option is easier to implement.
php artisan breeze:install vue
php artisan migrate
npm install
npm run dev
https://laravel.com/docs/9.x/starter-kits#laravel-breeze

nuxt spa is stuck on loading screen when deployed on CPanel while it works fine on local server

I have a nuxt project which was written by someone else. I built a production build by using nuxt build --spa and tested the build in dist folder locally b using PHP's built in server and it worked fine.
But after deploying to the CPanel hosting, it's just stuck on the loading screen and does not load. I'm new to Nuxt so I'm not sure what is the problem here. The url of the staging site is here http://staging.sustainabilityinnocenter.com. Please let me know what could be the problem