<?php

namespace App\Http\Controllers\Portal;

use App\Http\Controllers\Controller;
use App\Models\Goal;
use Illuminate\Http\Request;

class GoalsController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        $goals = Goal::all();

        return view('portal.goals.index', [
            'goals' => $goals,
        ]);
    }

    /**
     * Display the specified resource.
     *
     * @param  \App\Model\Goal  $goal
     * @return \Illuminate\Http\Response
     */
    public function show(Goal $goal)
    {
        $goals = Goal::all();
        
        return view('portal.goals.show', [ 
            'goal' => $goal,
            'goals' => $goals,
        ]);
    }
}
