I have a table called 'threads' in my laravel app, to which i want to add a new column named key with random strings of lenght 5. I ran the php artisan migrate:make add_key_to_threads on the CLL to create the migration file. In my generated migration file, the up function, i then used
Schema::table('threads', function($table){
$table->str_random('key', 5);
})
to add the new column, after which i ran php artisan migrate on my CLL. However, i keep getting "[Symfony\Component\Debug\Exception\FatalErrorException] syntax error, unexpected '}'" error on my CLL. Can someone help point out what i'm doing wrong please.