Laravel-admin: [NEED HELP] Admin::JS can not load script with pjax.

Created on 18 Sep 2017  路  3Comments  路  Source: z-song/laravel-admin

I using Admin::js('link') to load script. When going to another page then come back js can not load.
NOT REFRESH PAGE using js pjax in your lib.

  1. Dashboard link is ok
  2. User link is ok
  3. Dashboard link comback is get error js

Can you help me ? :(.

Can we have a config to disable pjax ?

Most helpful comment

hello
for laravel_admin with version #1.5

1-Change AdminServiceProvider in vendor/encore/laravel-admin/src
$this->loadViewsFrom(__DIR__.'/../resources/views', 'admin');
to
$this->loadViewsFrom(resource_path('views/admin'),'admin');

2.Copy all views from vendor/encore/laravel-admin/resources to your resources/view
3-Add your script in the end of content.blade.php before the @endsection tag is closed

All 3 comments

Open public/vendor/laravel-admin/laravel-admin/laravel-admin.js , comment out the rows associated with pjax

@z-song can we have another solution?

hello
for laravel_admin with version #1.5

1-Change AdminServiceProvider in vendor/encore/laravel-admin/src
$this->loadViewsFrom(__DIR__.'/../resources/views', 'admin');
to
$this->loadViewsFrom(resource_path('views/admin'),'admin');

2.Copy all views from vendor/encore/laravel-admin/resources to your resources/view
3-Add your script in the end of content.blade.php before the @endsection tag is closed

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cdhraesaemer picture cdhraesaemer  路  3Comments

MarKco picture MarKco  路  3Comments

joernroeder picture joernroeder  路  3Comments

clock1129 picture clock1129  路  3Comments

qcol picture qcol  路  3Comments