PHP code example of hexters / wirehmvc

1. Go to this page and download the library: Download hexters/wirehmvc 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/ */

    

hexters / wirehmvc example snippets


. . .

'providers' => ServiceProvider::defaultProviders()->merge([
    /*
    * Package Service Providers...
    */

    Hexters\Wirehmvc\LivewireHandleUpdateProvider::class, // add here

    /*
    * Application Service Providers...
    */
    App\Providers\AppServiceProvider::class,
    
    . . . 

. . .

use Hexters\Wirehmvc\Component;

. . .

class Welcome extends Component
{
  
  public function mount() {
    parent::mount();

    // Your code here...
  }
  
  public function render()
  {
      return view('admin::livewire.welcome');
  }

. . .


. . .

class BlogServiceProvider extends ServiceProvider
{
  . . .

  protected function defineLivewireComponents()
  {
      return [
          NabBar::class,

          // OR

          'nav-bar' => NavBar::class,
      ];
  }


<livewire:blog-nav-bar />

bash
composer dump-autoload
bash
php artisan module:make Blog
bash
php artisan module:make-livewire Counter --module=Blog
php artisan module:livewire-attribute ArticleTileAttribute --module=Blog
php artisan module:livewire-form ArticleForm --module=Blog
php artisan module:livewire-delete Counter --module=Blog
bash
php artisan livewire:layout