Git Product home page Git Product logo

livewire-wizard's Introduction

livewire-wizard's People

Contributors

trippo avatar vildanbina avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

livewire-wizard's Issues

how to add separate model for each step

as support single model what if some one try to add multiple models for examples
on first step user info on second step post info on third step category info which is three separate table each table have their own
form

pass value to parent componenet

Hello and thanks for good package
but I want to send some data from Step component to parent Component, how?
I was thinking about $this->emit($my_data), but Step extended component does not support it.
I want to pass some data to Parent livewire component to Step child component too, is it possible?

Have problem emitting from Javascript inside a step back to the component

I am working on a step where the user will be able to take a photo by using the camera. That is already working and the camera shows up and everything. BUT...

window.livewire.emit('storePhoto', canvas.toDataURL());

That line is doing nothing and it doesn't matter if I test

this.Livewire.emit('storePhoto', canvas.toDataURL());

or...

Livewire.emit('storePhoto', canvas.toDataURL());

Nothing happens and yes I have the protected $listeners setup and everything. Do you have any idea why I can't emit data to a function inside a step using the wizard?

Call to undefined function Vildanbina\LivewireWizard\str()

Hey,

Currently getting an error whenever I attempt to input something into an input field with a wire:model="state.example". I get this error: Call to undefined function Vildanbina\LivewireWizard\str() and it points me to the vendor/vildanbina/livewire-wizard/src/WizardComponent.php page on line 129 where it has $name = str($name);. All I'm doing is using the wire model like I've shown above, and on my save function I have

$model = $this-model;

$model->example = $state['example'];

$model->save();

and on my validation I'm doing this

return [
    [
        'state.example' => ['required']
    ],
    [
        'state.example' => __('Example')
    ]
]

This is creating a new model/entry so when using the wizard I've left it blank, e.g. <livewire:verify-wizard />.

Example source code

Hi, do you have any example source code?

Because the View Blade part I can't see how.

Image upload (WithFileUploads) function don't work with livewire-wizard

When i try to use the script
In: Livewire wizardcomponent
use Livewire\WithFileUploads; class CreateCampanha extends WizardComponent { use WithFileUploads; public $photo; ...
Blade:
... <input type="file" wire:model="photo">
And in Step controller:
`
public function save()
{
$this->validate([
'photo' => 'image|max:1024', // 1MB Max
]);

    $this->photo->store('photos');
}

`
But when the send button is pressed it gives this error Call to a member function store() on null this error seems to inform that no file was selected in the input

Problems using Laravel 9.36.4

With Version 9.36.4 of Laravel i get the following error when trying to show a Wizard:

Declaration of Vildanbina\LivewireWizard\Components\Step::view(string $view): static must be compatible with Illuminate\View\Component::view($view, $data = [], $mergeData = [])

Add support for livewire 3.0

Package cannot be upgraded with livewire 3.0:

vildanbina/livewire-wizard[v1.2, ..., v1.2.3] require livewire/livewire ^2.0 -> found livewire/livewire[v2.0.0, ..., 2.x-dev] but it conflicts with your root composer.json require (^3.0).
- Root composer.json requires vildanbina/livewire-wizard ^1.2 -> satisfiable by vildanbina/livewire-wizard[v1.2, v1.2.1, v1.2.2, v1.2.3].

PHP 8.0 support

Can you please add PHP 8.0 support, as not many other Laravel packages has supported 8.1 yet

Hook issue

Looks like the hook is not working as described in the doc

    public function onStepIn($name, $value)
    {
        // Something you want
        Log::debug("here :{$name}, {$value}" . get_class($this));
    }

Too few arguments to function App\Classes\WizardSteps\DocTemplate\UploadTemplate::onStepIn(), 0 passed in /Users/rabol/code/web/sign/vendor/vildanbina/livewire-wizard/src/Concerns/HasHooks.php on line 13 and exactly 2 expected

Does not like long class names

I have created a wizard like this:

php artisan make:livewire UserDocTemplateWizard

In a normal blade view I have this:

<livewire:user-doc-template-wizard user-id="{{auth()->user()->id}}"/>

That works fine, but when I extend my Livewire Component from WizardComponent

I get this error:

Unable to locate a class or view for component [errors].

Adding custom function to the Step to manipulate the state

Can you assit i need a way to call the addToCollection function from the step view but it's complain that method not found since i need to maintain all the action that are happening with the step being done in the given Step

public function mount()
    {
        $this->mergeState([
            'locations' => collect([
                [
                    'name' => '',
                ]
            ])
        ]);
    }

//


 public function addToCollection()
    {
        $this->state['locations']->push(['name' => '']);
    }

    public function removeFromCollection($key)
    {
        $this->state['locations']->pull($key);
    }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.