app/Service/TableGeneratorService.php
/**
     * create table metadata from the form submited to create new table for
     * guest user
     *
     * @param array $data
     */
create table metadata from the form submited to create new table for
guest user

@param array $data
create table metadata from the form submited to create new table for guest user @param array $data
public function extractTableMetaData(array $data)
    {
        $tableName = $data['table-name'];
        unset($data['_token']);
        unset($data['table-name']);
        $tableMeta = [];
        $i = 0;
        for ($j = 0; $j<count($data); $j+=2)
        {
            $tableMeta[] = [
                'name' => $data['column-name-'.$i],
                'type' => $data['column-type-'.$i]
            ];
            $i++;
        }
        return [
            'tableName' => $tableName,
            'tableMeta' => $tableMeta
        ];
    }
public function extractTableMetaData ( array $ data ) { $ tableName = $ data [ 'table-name' ] ; unset ( $ data [ '_token' ] ) ; unset ( $ data [ 'table-name' ] ) ; $ tableMeta = [ ] ; $ i = 0 ; for ( $ j = 0 ; $ j < count ( $ data ) ; $ j += 2 ) { $ tableMeta [ ] = [ 'name' => $ data [ 'column-name-' . $ i ] , 'type' => $ data [ 'column-type-' . $ i ] ] ; $ i ++ ; } return [ 'tableName' => $ tableName , 'tableMeta' => $ tableMeta ] ; }
create table metadata from the form submited to create new table for
 guest user
create table metadata from the form submited to create new table for guest user