jeroennoten / Laravel-AdminLTE

Easy AdminLTE integration with Laravel
MIT License
3.78k stars 1.08k forks source link

[BUG] Error while inserting custom plugin #1247

Closed sagarsutar007 closed 5 months ago

sagarsutar007 commented 5 months ago

Describe the bug

When I try to add custom plugin used inside the admin panel It throws Fatal error. I have the files in place also when I take the files array of custom plugin and put it inside any other plugin's files array it works. Right now I am running it like that. Please help me solve this issue.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Go to 'config/adminlte.php'
  2. Try adding 'CustomPlugin' => [ 'active' = true, 'files' =>[ [ 'type' => 'js', 'asset' => true, 'location' => 'assets/js/custom.js', ], [ 'type' => 'css', 'asset' => true, 'location' => 'assets/css/custom.css', ], ], ]
  3. Save and Run

Expected behavior

It should have added those files into my blade pages.

Screenshots

image

image

Environment

Item Version
Laravel 10
Project Inventory
OS Windows 11
dfsmania commented 5 months ago

@sagarsutar007 You have mistyped 'active' = true, instead of 'active' => true,. Maybe that's the reason of your error.

sagarsutar007 commented 5 months ago

Thanks for the solutions @dfsmania. That was the issue. Totally missed it.