mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-15 04:27:46 +02:00
feat(plugins): load README.md file to view plugin's instructions in UI
This commit is contained in:
parent
1510e36c0a
commit
e6bfdfc390
6 changed files with 196 additions and 2 deletions
|
|
@ -48,6 +48,22 @@ class PluginController extends BaseController
|
|||
]);
|
||||
}
|
||||
|
||||
public function view(string $vendor, string $package): string
|
||||
{
|
||||
/** @var Plugins $plugins */
|
||||
$plugins = service('plugins');
|
||||
|
||||
$plugin = $plugins->getPlugin($vendor, $package);
|
||||
|
||||
if ($plugin === null) {
|
||||
throw PageNotFoundException::forPageNotFound();
|
||||
}
|
||||
|
||||
return view('plugins/view', [
|
||||
'plugin' => $plugin,
|
||||
]);
|
||||
}
|
||||
|
||||
public function generalSettings(string $vendor, string $package): string
|
||||
{
|
||||
/** @var Plugins $plugins */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue