Closed Andrey-p23 closed 5 years ago
Thanks, I have already understood this, but I still have a problem. My voyager panel has no styles.
and no js and no images
Which errors does your browser console show?
I have this issues, too
We need more informations and maybe some debugging. Latest and latest is not useful for us to help you. The route is here: https://github.com/the-control-group/voyager/blob/00c7b80855589b98dca6a692c9abcdd000c6fb7f/routes/voyager.php#L139 And the method here: https://github.com/the-control-group/voyager/blob/00c7b80855589b98dca6a692c9abcdd000c6fb7f/src/Http/Controllers/VoyagerController.php#L75
For voyager version 1.2, the assets method in VoyagerController read asset files by using path from the Controller directory
$path = __DIR__.'/../../../publishable/assets'.$path;
If you have change config/voyager.php > controllers > namespace , the asset will be read from your project dir
$path = (Your Controller DIR ).'/../../../publishable/assets'.$path;
You can probably change the asset method from (Your Controller DIR )/VoyagerController.php
At line $path = __DIR__.'/../../../publishable/assets'.$path;
replace _DIR_
with 'TCG\\Voyager\\Http\\Controllers'
or use your custom asset directory if you wish
It is different from voyager version 1.1 where assets_path
can be set at config/voyager.php
Are you using Voyager on nginx ? try add this code to /etc/nginx/conf.d/YOUR-SERVER.conf
location ~* .(js|css|jpg|png|gif|svg|woff|ttf)$ {
try_files $uri $uri/ /index.php?$args;
}
Voyager works well if I start php artisan serve and if I add port in browser like this http://shop.project:8000/admin.
Voyager works well if I start php artisan serve and if I add port in browser like this http://shop.project:8000/admin.
If dont using php artisan serve
, Is it working ?
I have same problem:
My version information
Laravel: 5.8
Voyager: 1.2.2
PHP: 7.3
Database: PGSQL-11
in order to waiting, i've change my namespace Controller, then in VoyagerController::assets
i made
$path = str_start(str_replace(['../', './'], '', $path), '/');
$path = base_path('vendor/tcg/voyager/publishable/assets').$path;
instead of:
$path = str_start(str_replace(['../', './'], '', $path), '/');
$path = __DIR__.'/../../../publishable/assets'.$path;
also i change the proxy mode of nginx in order to use the @akat03 solution upper and now it work
If you override all controllers (what we dont recommend to do anyway) just do
class VoyagerController extends TCG\Voyager\Http\Controller\VoyagerController
and remove the assets()
method from your custom controller.
I change same as @FlickTheManual solution, it work. But I don't like updating like that.
Finally, Any other way? Or `The Control Group
should fix this issue and can consider it as a bug.
If you override all controllers (what we dont recommend to do anyway) just do
class VoyagerController extends TCG\Voyager\Http\Controller\VoyagerController
@emptynick, I've got some specific need in the controller, so I used what the team got to me: a Namespace Configuration that's work great, unless this issue, And for sure! It already extends the TCG\Voyager\Http\Controller\VoyagerController
and remove the
assets()
method from your custom controller.
for sure, I would like to! But I got an error with the original assets()
function;
This is why I post it here, just like a temp solution, I loved to help anybody here, but I don't know if it's a problem with my env
configuration, or the core framework with this version.
So:
and I've searching in the all github repository to show if it's a problem come to mine, but nope, We all got the idea at the same times, I'm sure, to make an issue here about this problem...
I face the same issue with Laravel 5.7.28
Weird thing is that when i go to admin panel at local machine, everything is fine, issue only happens when i publish to production server and try to go admin panel. All files from /admin/.... are 404 not found.
i already composer update, clear every cache, etc.
Faced same issue as guy above me. Everything is fine on local computer (on windows) and 404 error on production (linux). Tips about change VoyagerController::assets now working for me.
I think it's because I use nginx on production and apache on local machine. But have no idea how to fix it.
I found this inside routes/voyager.php in vendor folder:
//Asset Routes
Route::get('assets/{path}', ['uses' => $namespacePrefix.'VoyagerController@assets', 'as' => 'assets'])->where('path', '(.*)');
But what if my web-server sending css/js directly?
Okay, I solved it. But any way, The Control Group, what the?.. I think Laravel should NOT route to css, js and image files. I think it's not the best practice.
So "problem" is nginx configuration file for my website. Solution is to add the following strings to your server{ ... }
section:
location ^~ /admin/assets/ {
try_files $uri $uri/ /index.php?$query_string;
}
So now laravel will process queries to /admin/assets URL's and Route::get (that I posted above) will work correctly.
Okay, I solved it. But any way, The Control Group, what the?.. I think Laravel should NOT route to css, js and image files. I think it's not the best practice.
So "problem" is nginx configuration file for my website. Solution is to add the following strings to your
server{ ... }
section:location ^~ /admin/assets/ { try_files $uri $uri/ /index.php?$query_string; }
So now laravel will process queries to /admin/assets URL's and Route::get (that I posted above) will work correctly.
This solution should add into document or user guide
I don't think this is a solution. A laravel package should not require editing nginx config. I am guessing something to do with route cache. Clearing route cache might fix.
php artisan route:clear
I don't think this is a solution. A laravel package should not require editing nginx config. I am guessing something to do with route cache. Clearing route cache might fix.
php artisan route:clear
@nemrutco I already did it, also for any question of caching I did php artisan optimize:clear
, but unlucky, it don't work.
also, I'm agree with the @innerdev answer, unless in the provider, like all route you're done on the core package, i guess the public assets should not come from any of object package by default, unless it can be publishable and so we can work on this public assets, like the laravel original package work.
I prefer to do as the old 1.1 configuration assets, IMO
@emptynick and this is for answer what please?
Its the answer to
A laravel package should not require editing nginx config.
And
This solution should add into document or user guide
Yeah! 😄 OK, now, we know!
And so for the assets' problem?
Because it's only on this part, for mine, where I have a problem, unless if I do the solution #4004 . my nginx config file is significantly the same but the requirement for laravel production is done.
and like the @lohchansiang comment, I've seen the same comportment. and like this comment
It is different from voyager version 1.1 where assets_path can be set at config/voyager.php
and this is, IMO, a better solution, or the package asset configuration come from laravel (here the 5.6 configuration)
We did not change the way how we load assets because we like to make our users angry. Before, loading assets was done that way, meaning we can not change anything in JS or CSS files without forcing users to re-publish assets. So changing assets was only possible in a minor version (1.1, 1.2 and so on). Strictly following semver it would only be possible in a major version.
Now for the problem:
If I go to google and search for Laravel Nginx
I get a bunch of tutorials on how to configure Nginx applying the exact same "fix" as mentioned above + the guide from Laravel itself mentioning exactly the same.
Now for the problem: If I go to google and search for
Laravel Nginx
I get a bunch of tutorials on how to configure Nginx applying the exact same "fix" as mentioned above + the guide from Laravel itself mentioning exactly the same.
I think if this works, we didn't call on this issue, so why not?
for some user, this is the better solution.
Before, loading assets was done that way, meaning we can not change anything in JS or CSS files without forcing users to re-publish assets. So changing assets was only possible in a minor version (1.1, 1.2 and so on). Strictly following semver it would only be possible in a major version.
And so what the problem with that? Your upgrade guide is well documented, also the documentation entirely are pretty awesome, but some parts missing. It's not a judgement, just an improvement way. So we can do it for an upgrade, because you've done the assets better! This is not a problem for anybody who want use your framework in a lifetime!
And for semver, it a sort of "code of versioning conduct", not a prisoner chain, isn't it? In this part, you've got some change on asset, so what? You come from 0.11 to 1.1 to 1.2; Some big change on each version, and no one come to judge TCG for that, so what's the problem to do a new forcing publishing asset, especially when you find yourself in a situation like this?
This is a problem, and some done a solution, each in their own way. But, finally, somebody feels that the old configuration is better, so, for the time of an improvement on it, why did you answer like this?
We did not change the way how we load assets because we like to make our users angry.
I don't think of that, as I prefer to consider the improvement of such a tool like voyager, than the feel of somebody mood. And I'm sure that you do your best to improve a nice jewel like voyager.
why did you answer like this?
Like what?
for some user, this is the better solution.
For most, the current is the better.
Again, we don't make such changes to downgrade the user-experience.
Take a look at Laravel Nova, even the makers of Laravel don't use publishes
functionality. Coincidence?
What are your current server.location configs?
What are your current server.location configs?
same as https://laravel.com/docs/5.8/deployment#nginx
Again, we don't make such changes to downgrade the user-experience.
and the new change dowgrade the user-experience too ... so?
Take a look at Laravel Nova, even the makers of Laravel don't use publishes functionality. Coincidence?
hum, not sure about this: https://nova.laravel.com/docs/2.0/installation.html#updating-nova
For the asset() method issue, I replace the asset routes,
Route::group(['prefix' => 'admin'], function () { Voyager::routes(); Route::get('assets/{path}', [ 'uses' => 'custom\CustomVoyagerController@assets', 'as' => 'voyager.assets' ])->where('path', '(.*)'); });
and add a controller extended from VoyagerController, replace asset() method
$path = str_start(str_replace(['../', './'], '', $path), '/'); $path = base_path('vendor/tcg/voyager/publishable/assets').$path;
Using this will not required to change the config/voyager > controllers > namespace .
Using this will not required to change the config/voyager > controllers > namespace .
This problem (one of it) only occurs because that value was changed.
Is anyone with the Nginx problem in our Slack group and wants to try some things out? Please pm me then.
@emptynick i did pm you
Thanks to @nemrutco we figured out that https://github.com/the-control-group/voyager/pull/4004 fixes the problem.
A URL like admin/assets/app.css
makes Nginx think that there should be a physical file on disk and doesn't process the request through PHP.
With this PR, assets are loaded as admin/assets?path=app.css
It should be because you have more specific location for img, css and js in your nginx config.
I got the same issue and I add this to resolve :
location ^~ /voyager-admin/assets/ {
try_files $uri /index.php$is_args$args;
access_log off;
expires 30d;
}
I had to downgrade to 1.1 because in this version I'm unable to extend the logo and background.
Okay, I solved it. But any way, The Control Group, what the?.. I think Laravel should NOT route to css, js and image files. I think it's not the best practice.
So "problem" is nginx configuration file for my website. Solution is to add the following strings to your
server{ ... }
section:location ^~ /admin/assets/ { try_files $uri $uri/ /index.php?$query_string; }
So now laravel will process queries to /admin/assets URL's and Route::get (that I posted above) will work correctly.
thanks bro,i fix my problem!!
@emptynick
Have you ever seen this before, and the asset url like
http://www.ic-u.cn/admin/works/2/undefined?path=js/skins/voyager/content.min.css
My nginx have add this:
location ^~ /admin/assets/ {
try_files $uri $uri/ /index.php?$query_string;
}
Need your help!
If you are on 1.2.3 you can remove this Nginx config again. Should work then.
@emptynick Hi,i have remove the Nginx config below
location ^~ /admin/assets/ {
try_files $uri $uri/ /index.php?$query_string;
}
My Nginx config is:
server
{
listen 80;
#listen [::]:80;
server_name www.ic-u.cn *.ic-u.cn;
index index.html index.htm index.php default.html default.htm default.php;
root /home/www/icu/public;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
#error_page 404 /404.html;
# Deny access to PHP files in specific directory
#location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }
include enable-php-pathinfo.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /.well-known {
allow all;
}
location ~ /\.
{
deny all;
}
access_log /home/wwwlogs/www.ic-u.cn.log;
}
I am using voyager 1.2.3 ,but it still not work,do i have to make anthing else?
@emptynick wait , I thought of something hha
@emptynick I have override the controller and view,now it work thaks
i have same problem now but on "nginx:mainline-alpine" docker image "tcg/voyager": "^1.2" "laravel/framework": "5.7.*",
ENV NGINX_VERSION 1.15.12 ENV NJS_VERSION 0.3.1
i have tried but no one of them work
location ~* .(js|css|jpg|png|gif|svg|woff|ttf)$ {
try_files $uri $uri/ /index.php?$args;
}
location ^~ /admin/assets? {
try_files $uri $uri/ /index.php?$query_string;
}
i have same problem now but on "nginx:mainline-alpine" docker image "tcg/voyager": "^1.2" "laravel/framework": "5.7.*",
ENV NGINX_VERSION 1.15.12 ENV NJS_VERSION 0.3.1
i have tried but no one of them work
location ~* .(js|css|jpg|png|gif|svg|woff|ttf)$ { try_files $uri $uri/ /index.php?$args; }
location ^~ /admin/assets? { try_files $uri $uri/ /index.php?$query_string; }
sorry,buy have you solved your problem?
Same symptoms as above, I also get some error logs:
[2019-07-30 14:36:39] production.ERROR: File does not exist at path /usr/share/nginx/xxxxx/vendor/tcg/voyager/publishable/assets/ {"exception":"[object] (Illuminate\\Contracts\\Filesystem\\FileNotFoundException(code: 0): File does not exist at path /usr/share/nginx/xxxxx/vendor/tcg/voyager/publishable/assets/ at /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:41)
[stacktrace]
#0 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(237): Illuminate\\Filesystem\\Filesystem->get('/usr/share/ngin...')
#1 /usr/share/nginx/xxxxx/vendor/tcg/voyager/src/Http/Controllers/VoyagerController.php(87): Illuminate\\Support\\Facades\\Facade::__callStatic('get', Array)
#2 [internal function]: TCG\\Voyager\\Http\\Controllers\\VoyagerController->assets(Object(Illuminate\\Http\\Request))
#3 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): call_user_func_array(Array, Array)
#4 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\\Routing\\Controller->callAction('assets', Array)
#5 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Routing/Route.php(219): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(TCG\\Voyager\\Http\\Controllers\\VoyagerController), 'assets')
#6 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Routing/Route.php(176): Illuminate\\Routing\\Route->runController()
#7 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Routing/Router.php(680): Illuminate\\Routing\\Route->run()
#8 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#9 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(41): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#10 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#11 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#12 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(75): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#13 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#14 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#15 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#16 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#17 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#18 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(56): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#19 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Session\\Middleware\\StartSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#20 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#21 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#22 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#23 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#24 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(66): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#25 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#26 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#27 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(104): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#28 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Routing/Router.php(682): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#29 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Routing/Router.php(657): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))
#30 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Routing/Router.php(623): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))
#31 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Routing/Router.php(612): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))
#32 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))
#33 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))
#34 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#35 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#36 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#37 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#38 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#39 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#40 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#41 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#42 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#43 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(62): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#44 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#45 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#46 /usr/share/nginx/xxxxx/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#47 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Fideloper\\Proxy\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#48 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#49 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(104): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#50 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(151): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#51 /usr/share/nginx/xxxxx/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#52 /usr/share/nginx/xxxxx/public/index.php(55): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#53 {main}
"}
The weird thing is I've confirmed the directory exists and the files inside. Not sure why it's erroring.
edit
Hmm at https://github.com/the-control-group/voyager/blob/1.2/src/Http/Controllers/VoyagerController.php#L76
$request->path
seems to be empty (even tho it's set at the url)
edit
Yeah... invalid nginx config, was missing $query_string
from main location redir for some reason. If in doubt follow https://laravel.com/docs/5.8/deployment#nginx
This error was missing on your page. should be include tag bellow
<meta name="assets-path" content="{{ route('voyager.assets') }}"/>
This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.
Version information
Description:
Voyager can't find app.css, app.js, and images. It tries to find it in this directory: http://projectname/admin/assets/css/app.css. But I have some previous projects with voyager and there is another path: http://projectname/vendor/tcg/voyager/assets/js/app.css. Also in my current project there is no such a folder: domains\projectname\public\vendor\tcg\voyager\assets, but it should be there, because it is in my previous projects. I reinstall laravel project and voyager several times, but it didn't help. My env: APP_URL=http://shop.project
Additional context
Please help me