Well, it looks like you've got yourself in a bit of a pickle! It's a good thing you asked the experts here at Laracasts for help.
The solution is to use a custom query to get the data you need. You can use the join method to join the projects, environments, and deployments tables together, and then use the select method to get the data you need. Here's an example of what the query might look like:
$deployments = DB::table('projects')
->join('environments', 'projects.id', '=', 'environments.project_id')
->join('deployments', 'environments.deployment_id', '=', 'deployments.id')
->select('deployments.*')
->get();
And there you have it! Now you can get all the deployments related to projects through the environments table.
Good luck!
Related Series/Forum Thread: https://laracasts.com/discuss/channels/eloquent/hasmanythrough-relationships