PHP code example of armincms / wizard

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

    

armincms / wizard example snippets

 
    /**
     * Get meta information about this resource for client side comsumption.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public static function additionalInformation(Request $request)
    {
        return ['wizard' => true];
    }


use Armincms\Wizard\Step;


calss MyResource extends Resource
{  
    /**
     * Get the fields displayed by the resource.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function fields(Request $request)
    {
    	return [
    		// some fields

    		Step::make('Step One', [
    			// step one fields
    		]),

    		Step::make('Step Two', [
    			// step two fields
    		]),

    		Step::make('Step Three', [
    			// step three fields
    		]),
    	];
    }
}