Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

nugroho_redbuff's avatar

Modified Directory Structure

I have different laravel structure. Inside the root directory, we have App-Data folder and Dist folder. App-data folder basically is the laravel app foler which contain app, config, database, resources, and so on. The original Public folder become the HisCustomLaravel, and Dist folder is the asset storage for css, js and images. Here is the illustration

/HisCustomLaravel

/-App-data/

| |-app

| |-config

| |-database

| |- ...

| |-resources

| |-route

| |.env

| |artisan

|

/-Dist

| |-css

| |-js

| |-images

| |index.php

| |.htaccess

Problem: I deploy this to xampp with normal command of installation such as composer install, artisan key:generate. I want to call the app with http/https: localhost/HisCustomLaravel. When i execute it, the web can't find the asset requested by blade {{ asset('dist/css/app.css') }}. Something is missing, laravel configuration or xampp configuration. By the way, it works on internet hosting.

Please help me to solve this. Thanks.

0 likes
1 reply
Ferid's avatar

You mean you change the Public folder as Dist if it's, then you have to add

ASSET_URL=http://localhost/dist or ASSET_URL=/dist or ASSET_URL=dist or ASSET_URL=dist/

to .env file

Please or to participate in this conversation.