bvnbhati
bvnbhati

Reputation: 382

Laravel 5.4 remove public from url :Side effects

I have successfully removed 'public' from my Laravel project URL.

Now when I include any asset using helper function asset() I have to include public at all places like below.

asset('public/images/a.img')

When I try dumping helper function basepath() and publicpath(), correct values are displayed. How can I avoid writing public all the times in all calls to asset. Is there anyway asset function uses publicpath() instead of basepath().

Upvotes: 0

Views: 363

Answers (1)

ndberg
ndberg

Reputation: 3971

You have to set your Web Directory on your Web Server to point to

/yourproject/public

it seems like your pointing now to

/yourproject/

Upvotes: 1

Related Questions