I am trying to populate two columns with random strings whenever a new user is created in laravel
maybe something like this in User model
public function putStringInDatabase () {
$this->public_key = str_random(40);
}
and whenever a new row is added in users table public_key and private_key columns get updated automatically by that random string