The court ruled that Trump's presidential powers did not authorise him to set up an 'alternative immigration system'.