1. Go to this page and download the library: Download laravarc/core 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/ */
laravarc / core example snippets
public function register(): void
{
$this->app->register(CatalogEventServiceProvider::class);
config()->push('laravarc.extensions', CatalogCoreExtension::class);
}
use Laravarc\Core\Metadata\Attributes\SeedPriority;
#[SeedPriority(100)]
final class PlatformRolesSeeder extends Seeder { /* … */ }
use App\Shared\Admin\User\Events\UserDeletedEvent;
use Laravarc\Core\Metadata\Attributes\ListenTo;
#[ListenTo(UserDeletedEvent::class)]
final class CleanupOrdersOnUserDeletedListener
{
public function handle(UserDeletedEvent $event): void
{
// use primitive IDs from $event
}
}
'extensions' => [
// \Laravarc\Authorizer\... or your own CoreExtension
],