1. Go to this page and download the library: Download ruvelo/laravel-wiki 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/ */
ruvelo / laravel-wiki example snippets
use Illuminate\Support\Facades\Gate;
Gate::define('wiki-edit', fn ($user) => $user->is_admin);
use Ruvelo\Wiki\Wiki;
$page = Wiki::write('Release notes', $markdown, 'v2.0 notes', $user); // create or update
Wiki::create('Onboarding'); // throws PageAlreadyExists if taken
Wiki::find('Release notes')?->html(); // by title or slug
Wiki::search('deploy')->limit(5)->get();
Wiki::render('**Markdown** with [[links]]');
// Refuse the save if someone else saved since revision 41
$page->commit($title, $body, 'Fix typo', $user, basedOn: 41);