Use in the image path (if its public path)
// asset not assett, this in intentionally for scape.
<img src ="{{ assett ( 'route_your_image.png' )" }}
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi, I have installed Platform 4.0 by Cartalyst. it was working okay on localhost/dev/public but would like to access it via app.dev
I created a virtual host by in these steps
I opened the httpd-vhosts.conf file located at F:\xamp\apache\conf\extra\https-vhosts.conf
and replaced everything with this
# Virtual Hosts
#
# Required modules: mod_log_config
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.4/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# Use name-based virtual hosting.
#
#NameVirtualHost *:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ##ServerName or ##ServerAlias in any <VirtualHost> block.
#
<VirtualHost localhost>
DocumentRoot "F:/xampp/htdocs"
ServerName localhost
ServerAdmin admin@localhost
<Directory "F:/xampp/htdocs">
Options Indexes FollowSymLinks
AllowOverride FileInfo
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
# Development
<VirtualHost app.dev>
DocumentRoot "F:/xampp/htdocs/dev/public"
ServerName app.app
ServerAdmin admin@localhost
ServerAlias app.dev
<Directory "F:/xampp/htdocs/dev/public">
AllowOverride All
Order Allow,Deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
Then I opened my hosts file located at C:\Windows\System32\drivers\etc and added this line to it
127.0.0.1 localhost app.dev
so my hosts file looks like this
127.0.0.1 localhost app.dev
127.0.0.1 127.0.0.1
and now I am able to open my app.dev but the images do not resolve.
I updated the URL path in the app.php
'url' => 'http://app.dev',
How can I fix the images issue?
I was advised to remove all the files in side public\cache\assets folder except of .gitignore and it worked :)
Please or to participate in this conversation.