brexis / laravel-workflow

Use the Symfony Workflow component in Laravel
MIT License
281 stars 105 forks source link

Where does the data stored? #30

Closed hdrm147 closed 5 years ago

hdrm147 commented 6 years ago

Where the data stored? DB? Or System Files? Memory? by data i mean the current place for some model

himan72 commented 6 years ago

same question for me ????

himan72 commented 6 years ago

ok i figure out the answer we must add a field type json to the model table (name can be set on the config file under arguments) and cast it to an array

error500 commented 5 years ago

First you should create a field in Post model, ie Post->status Then in config, first argument is the name of this field

'marking_store' => [

    'type'      => 'multiple_state',

    'arguments' => ['status']

],

$post->save(); saves the current place in the Post model.

Without name in config, default name is marking

brexis commented 5 years ago

Closing this as @error500 answer the question.