1. Go to this page and download the library: Download scapteinc/lara-veil 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/ */
// In a plugin or service provider
use Scapteinc\LaraVeil\Core\HookSystem;
app('hook')->addAction('system.init', function() {
// Custom initialization logic
});
app('hook')->addFilter('media.upload', function($file) {
// Process before upload
return $file;
});
use Scapteinc\LaraVeil\Models\Plugin;
use Scapteinc\LaraVeil\Models\Theme;
use Scapteinc\LaraVeil\Models\Media;
// Get all active plugins
$active = Plugin::where('is_active', true)->get();
// Get active theme
$theme = Theme::where('is_active', true)->first();
// Get media files
$media = Media::latest()->paginate(15);
use Scapteinc\LaraVeil\Managers\PluginManager;
$manager = app('plugin.manager');
// List all plugins
$plugins = $manager->all();
// Activate a plugin
$manager->activate('my-plugin');
// Deactivate a plugin
$manager->deactivate('my-plugin');
use Scapteinc\LaraVeil\Facades\Hook;
// Add an action
Hook::addAction('admin_menu', function() {
// Custom logic
});
// Apply a filter
$content = Hook::applyFilters('the_content', $post->content);