Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ivanfuhr-72282810's avatar

Livewire Starter Kit without volt

I really liked the starter kits, especially Livewire because that's what I normally use in my applications, but I can't like the choice of using Volt, I don't like the idea it brings of "everything in one file", things don't seem to work well there, wouldn't it be nice to have the option of using traditional Livewire?

1 like
3 replies
LaryAI's avatar
Level 58

If you prefer using traditional Livewire components without the Volt approach, you can certainly set up a Laravel project with Livewire in the conventional way. Here's a step-by-step guide to get you started:

  1. Create a New Laravel Project:

    First, create a new Laravel project using Composer:

    composer create-project laravel/laravel your-project-name
    
  2. Install Livewire:

    Navigate into your project directory and install Livewire via Composer:

    cd your-project-name
    composer require livewire/livewire
    
  3. Publish Livewire Assets:

    Publish the Livewire configuration and assets:

    php artisan livewire:publish
    
  4. Create a Livewire Component:

    You can create a new Livewire component using the Artisan command:

    php artisan make:livewire ExampleComponent
    

    This will create two files: ExampleComponent.php in app/Http/Livewire and example-component.blade.php in resources/views/livewire.

  5. Use the Livewire Component in a Blade View:

    You can include your Livewire component in a Blade view like this:

    <!-- resources/views/welcome.blade.php -->
    <!DOCTYPE html>
    <html>
    <head>
        <title>Livewire Example</title>
        @livewireStyles
    </head>
    <body>
        @livewire('example-component')
    
        @livewireScripts
    </body>
    </html>
    
  6. Define Component Logic:

    In your ExampleComponent.php, you can define the logic for your component:

    <?php
    
    namespace App\Http\Livewire;
    
    use Livewire\Component;
    
    class ExampleComponent extends Component
    {
        public $message = 'Hello, Livewire!';
    
        public function render()
        {
            return view('livewire.example-component');
        }
    }
    
  7. Design the Component View:

    In your example-component.blade.php, you can design the view:

    <div>
        <h1>{{ $message }}</h1>
    </div>
    
  8. Run Your Application:

    Finally, serve your application to see Livewire in action:

    php artisan serve
    

By following these steps, you can use Livewire in the traditional way without the Volt approach, keeping your components and views in separate files. This setup allows you to maintain a clear separation of concerns and structure your application as you prefer.

Tray2's avatar

@ivanfuhr-72282810 I agree with you, Volt makes the code look like a mess. I did a test to remove volt, and it wasn't super tricky.

I did the login page.

app/Livewire/Auth/Login.php

`resources/views/livewire/auth/login.blade.php``

routes/auth.php

ivanfuhr-72282810's avatar

@Tray2 oh cool, I think it won't be that hard to remake the livewire starter kit without volts, I'll try to do it here

Please or to participate in this conversation.