PHP code example of olssonm / livewire-synthesizer
1. Go to this page and download the library: Download olssonm/livewire-synthesizer 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/ */
olssonm / livewire-synthesizer example snippets
namespace App\Resources;
use Olssonm\LivewireSynthesizer\Resources\GenericResource;
class Post extends GenericResource
{
//
}
namespace App\Synthesizers;
use App\Resources\Post;
use Olssonm\LivewireSynthesizer\Synthesizers\GenericSynthesizer;
class Post extends GenericSynthesizer
{
public static $key = 'post';
public static $class = Post::class;
}
use App\Support\Synthesizers\Post;
use Livewire\Livewire;
/**
* Register any application services.
*/
public function register(): void
{
Livewire::propertySynthesizer(Post::class);
}