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

Man's avatar
Level 2

403 Error Forbidden path Laravel Homestead 2.0

I am using this code in my index:

<ul class="nav nav-pills pull-left">
                        <li><a href="{{ URL::to('/') }}"><img height="40" width="183" src="{{ config('constant.SYSTEM_IMAGE_URL').App\Setting::param('site','logo')['value'] }}" alt="{{ App\Setting::param('site','app_name')['value'] }}"></a></li>
                    </ul>

The problem is from the SYSTEM_IMAGE_URL, and the constant.php file has this:

'SYSTEM_IMAGE_URL' => config('app_path').'/assets/images/setting/',

Now I get the forbidden error 403. My homestead vagrant permission shows this:


-rwxr-xr-x 1 vagrant vagrant   1273 Apr 22  2016 select_arrow.jpg
drwxr-xr-x 1 vagrant vagrant    102 Aug 19  2016 setting
-rwxr-xr-x 1 vagrant vagrant   9851 Apr 22  2016 sprite.png

What would the problem be. It looks like there is permission in my vagrant box.

0 likes
5 replies
Jaytee's avatar

It'll be a permission issue. The app folder is meant to be secure right, since it houses your application code.

You can use the public directory for your assets, that's why the directory exists.

Man's avatar
Level 2

@Jaytee I thought app_path() goes to the public directory. If not, what should I use instead of app_path? the folder that I need it to go to is located at: my/root/folder/public/assets/images/settings.

Man's avatar
Level 2

seems like the problem is in

'SYSTEM_IMAGE_URL' => config('app_path').'/assets/images/setting/',

Please or to participate in this conversation.