PHP code example of webflorist / vuefactory

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

    

webflorist / vuefactory example snippets


(new Webflorist\VueFactory\VueInstance('#app'))
    ->addComputed('computed_5','function () { return 2+3 })')
    ->addComputed('computed_8','function () { return 4+4 })')
    ->addData('string','value')
    ->addData('boolean_true',true)
    ->addData('boolean_false',false)
    ->addData('array',['item1','item2'])
    ->addData('object',(new \stdClass()))
    ->addMethod('say_hello','function () { alert("Hello!") })')
    ->addMethod('say_bye','function () { alert("Bye!") })')
    ->addPropsData('property1','value1')
    ->addPropsData('property2',true)
    ->addPropsData('property3',['item1', 'item2'])
    ->addWatcher('data1','value1')
    ->addWatcher('data2','value2')
    ->generate();