1 hour ago, FDC1601 said:
Sorry, but I don’t understand the “Call the widgets anywhere you want like you call/load others” on the README.
I installed Disposible Tools & Widgets but cannot figure out how to put any of the widgets into a page on my phpvms7 website.
Disposible Tools & Widgets seems to be installed as on the “Online Readme”
Can I get an example of how to put TopPilots widget on a page?
Thanks,
Tim F., FDC1601
https://github.com/FatihKoz/DisposableTools#usage
This section gives the main usage of all available widgets provided by Disposable Tools. Also at the same readme there are detailed sub-sections for each widget.
https://github.com/FatihKoz/DisposableTools#top-pilots
So for example, if you want to use " TopPilots" widget at your home page, you need to do below items
-
Find the blade file responsible for the page you want to add the widget. Here in our example, imagine you want " Home" page so it is " home.blade.php" located directly under your theme folder.
-
Edit that file, pick a suitable location as you wish, then add it.
@widget('DisposableTools::TopPilots', ['type' =\> 'landingrate'])
- Save the file.
I just copied the example usage syntax from the readme file.
If you want to adjust the widget options, then you need to follow the explanations provided in the readme. For example, you want to display not overall leaderboard but only last month, then you add relevant configuration options to the widget call
@widget('DisposableTools::TopPilots', ['type' =\> 'landingrate', 'period' =\> 'lastm'])
Also you may want to show top 10 pilots, then it would be
@widget('DisposableTools::TopPilots', ['type' =\> 'landingrate', 'period' =\> 'lastm', 'count' =\> 10])
Most of the time, people get confused with the “grid” design used by Bootstrap (the theme’s core) and can not find the correct blade file (“blade” is a Laravel term).
All visible pages (the output) are called “blades” and they are stored under your theme folder (nicely organized). Everything related to dashboard is under dashboard folder, pages related to flights are under flights folder etc. etc.
If you need more info about Bootstrap and Laravel Blade, I would kindly suggest checking their official documents.
( Default theme uses Bootstrap 4.3 / Disposable Theme v2 uses Bootstrap 4.6 / phpvms v7 uses Laravel 8.x series )
If you are using Disposable Theme you can check it’s home.blade.php as an example for how the “grid” system works and how the widgets are placed. Or you can check it from Github with below link
https://github.com/FatihKoz/DisposableTheme/blob/main/resources/views/layouts/Disposable_v2/home.blade.php#L33-L48
Hope this helps