Why did we made it a game object in "gameobject laser = ". Why not let it be a prefab?
private void Fire()
{
if (Input.GetButtonDown("Fire1"))
{
GameObject laser = Instantiate(laserPrefab, transform.position, Quaternion.identity) as GameObject;
laser.GetComponent<Rigidbody2D>().velocity = new Vector2(0, projectileSpeed);
}
}