Installation
Arcanist requires PHP 8 and Laravel 8.
composer require laravel-arcanist/arcanist
Documentation
You can find the full documentation here.
Credits
License
MIT
Category: PHP / Frameworks |
Watchers: 2 |
Star: 88 |
Fork: 3 |
Last update: May 6, 2021 |
Arcanist requires PHP 8 and Laravel 8.
composer require laravel-arcanist/arcanist
You can find the full documentation here.
MIT
Currently there are renderers available for blade templates and Inertia.js (I am not familiar with this, so bare with me). If I have a JavaScript frontend project (Vue, React, Svelte, etc.) that is separate from the Laravel side, how best would I pass the data back and forth? I suppose I could start with WizardStep::viewData, I would just need to dig into the source code and docs a bit more to figure that out. Are there any caveats I should know about?
Hi there, I see this package very useful for something my company is trying to do
Also we're using InertiaJS, it will be very nice to have compatibility with this package like the "Custom renderers" (which seems wip in the docs page) and sharing data will be much easier reusing Inertia's methods.
The following PR will allow the onCompleteAction
class to have information about the wizard in addition to the already available payload.
E.g.
<?php
namespace App\Wizards\Registration;
use Arcanist\Action\WizardAction;
use Arcanist\Action\ActionResult;
class RegistrationAction extends WizardAction
{
public function execute($payload, $wizard): ActionResult
{
return $this->success();
}
}
Hi there,
Firstly, I'm having an amazing time playing with this package, thank you for the time & effort you've put in to it!
I noticed that I was getting a 500 error when trying to access data in the payload of my Action class but only on the first time I tried to submit, if I refreshed it worked fine.
I traced this through in the code (AbstractWizard.php
) and found that the instance doesn't have access to the updated data yet in processLastStep
- I'm assuming it's been persisted but not reloaded/attached to the instance straight away.
I fixed this on the example I'm working with by reloading the wizard after the saveStepData
call in the update function.
EDIT: I'm also using the inertia-response-renderer package incase that infromation is helpful
Disclaimer
It's highly likely I'm using this wrong so if I am, I apologise for wasting your time,
Cheers!
Currently a WizardSteps title property does not respect the return value of $this->title()
. For Steps with dynamic titles this should be fixed.
Issue reference: #43
Please let me know if there's anything I can change here, I've tried to implement this in the most elegant way without having to modify a bunch of logic. I needed this for a personal project, and it works fine as is (afaik), but if there's a better way of doing this without rewriting the entire wizard logic let me know 😂
I've created a POC for optional steps, which extends an omit
function on the WizardStep class, which, if returns true, the step is omitted from the wizard at that time. This omit function allows the wizard to be considerably more dynamic, as a step can be omitted based on configurable user state, or even data from previous steps.
I'm wondering if there's a separate repository or branch for this upcoming version? There appears to be only the main branch for this repository, and I cannot find any other reference to the upcoming 1.0 version - other than it's under development, and coming soon.
Hi,
I'm experiencing with this package and I have a trouble with file uploading:
WizardAction
I'm reading a file field (e.g. avatar) through $payload
and i want to do something like Storage::putFile('avatars', $payload['avatar']);
to store file in a local storage, but $payload['avatar']
is always an empty array. How to fix that?Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires laravel-arcanist/inertia-response-renderer ^0.5.0 -> satisfiable by laravel-arcanist/inertia-response-renderer[0.5.0].
- laravel-arcanist/inertia-response-renderer 0.5.0 requires inertiajs/inertia-laravel ^0.4.1 -> found inertiajs/inertia-laravel[v0.4.1, ..., v0.4.5] but it conflicts with your root composer.json require (^0.5.1).
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions
This PR lets you define validation rules for nested array input:
Field::make('checkboxes')
->rules(['checkboxes.*' => 'in:optionA,optionB')
Full Changelog: https://github.com/laravel-arcanist/arcanist/compare/0.6.0...0.7.0
Full Changelog: https://github.com/laravel-arcanist/arcanist/compare/0.5.2...0.6.0
fields
method to public
. This should make it possible to have generic
templates by looping over the field definitions (#17, @thoresuenert)ResponseRenderer
interface to be less restrictive