I am trying to test an array to see if they exist in they table as column names, If they don't I want to create them.
$metrics = ['total', 'average_age', 'total_age']
foreach($metrics as $metric) {
\Schema::table('postInsightsData', function($table, $metric)
{
$table->string($metric->column_name);
});
}
```
The first problem is I cannot pass the array into the Schema create method. Any