One solution is to create a symbolic link from the public folder of your Laravel project to the assets folder in your public_html directory. This way, you can access the assets directly from the public folder of your Laravel project without changing the template code.
Here are the steps to create the symbolic link:
- SSH into your server and navigate to the public folder of your Laravel project:
cd /path/to/laravel/public
- Create a symbolic link to the assets folder in your public_html directory:
ln -s /path/to/public_html/assets assets
- Verify that the symbolic link was created successfully:
ls -l
You should see a new symlink named "assets" pointing to the assets folder in your public_html directory.
- Update your template code to use the new path to the assets:
<link rel="stylesheet" media="screen" href="/assets/assets_user/css/theme.min.css">
This should work without any issues, as the symlink will redirect the request to the correct path.
Note: If you're using a shared hosting environment, you may not have permission to create symbolic links. In that case, you can try using the "public_path" helper function in Laravel to generate the correct path to the assets. For example:
<link rel="stylesheet" media="screen" href="{{ public_path('assets/assets_user/css/theme.min.css') }}">