PHP code example of jey / livewire-styleable
1. Go to this page and download the library: Download jey/livewire-styleable 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/ */
jey / livewire-styleable example snippets
t
namespace App\View\Component;
use App\Models\Post;
use Jey\LivewireStyleable\HasStyle;
use Livewire\Component;
class LatestPosts extends Component
{
use HasStyle;
public function render()
{
return view('components.latest-posts', [
'posts' => Post::published()
->latest()
->take(3)
->get(),
]);
}
}