1. Go to this page and download the library: Download pxgamer/minimin library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
pxgamer / minimin example snippets
namespace {vendor}\{plugin};
use pxgamer\Minimin\Smarter;
class App
{
// When initialised by the Minimin class, it will pass the $route to the plugin App constructor
public function __construct($route)
{
// ... Run plugin commands
$Smarter = Smarter::get();
$Smarter->addTemplateDir(__DIR__ . '/Templates/');
}
}
namespace {vendor}\{plugin};
class Plugin
{
public static function info()
{
/** This function MUST return the following values:
* - app_namespace
* - name
* - link
* - description
*/
$object = (object)[
'app_namespace' => '\\{vendor}\\{plugin}', // The namespace of the plugin
'name' => 'Cron Tasks', // The name of the plugin, may contain spaces
'link' => 'cron-tasks', // The link that will be used (e.g. `cron-tasks` will be `/cron-tasks`)
'description' => 'A cron task manager for servers.' // The description of the plugin
];
return $object;
}
}
text
/
src/
/Templates
/{PluginName}
App.php
Plugin.php
composer.json
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.