-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
When using wayfinder, Eloquent FileMaker will throw an error trying to generate its files.
How to trigger the generate:
php artisan wayfinder:generateFindings
The package would use the getColumns method on the Schema Builder but the FM version does not override that method. We just directly overrode the getColumnListing method. We can update the getColumns method to map the data returned from FileMaker's layout endpoint. Then we can eliminate the getColumnListing method because the method would become the same as the underlying version.
<?php
namespace GearboxSolutions\EloquentFileMaker\Database\Schema;
class FMBuilder extends \Illuminate\Database\Schema\Builder
{
/**
* Get the column listing for a given table.
*
* @param string $table
* @return array
*/
public function getColumnListing($table)
{
$layoutMetaData = $this->connection->getLayoutMetadata($table);
$fieldMetaData = $layoutMetaData['fieldMetaData'];
$columns = array_column($fieldMetaData, 'name');
return $columns;
}
}Metadata
Metadata
Assignees
Labels
No labels