1. Go to this page and download the library: Download fbollon/lara-cms-lite 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/ */
fbollon / lara-cms-lite example snippets
public function canManageLaraCmsLiteContent(): bool
{
return true;
}
public function canManageLaraCmsLiteContent(): bool
{
return $this->role === 'admin';
}
use Illuminate\Support\Facades\Gate;
Gate::define('lara-cms-lite-manage', function ($user) {
return $user->canManageLaraCmsLiteContent();
});
use Fbollon\LaraCmsLite\Models\Content;
public function index()
{
$contents = Content::getContextualContent();
return view('your.view', compact('contents'));
}