Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
28.57% covered (danger)
28.57%
2 / 7
CRAP
54.17% covered (warning)
54.17%
13 / 24
ListController
0.00% covered (danger)
0.00%
0 / 1
28.57% covered (danger)
28.57%
2 / 7
25.86
54.17% covered (warning)
54.17%
13 / 24
 __construct
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
2 / 2
 myproposals
0.00% covered (danger)
0.00%
0 / 1
2.06
75.00% covered (warning)
75.00%
3 / 4
 allproposals
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
2 / 2
 proposalsImIn
0.00% covered (danger)
0.00%
0 / 1
6.00
0.00% covered (danger)
0.00%
0 / 4
 proposalsIWon
0.00% covered (danger)
0.00%
0 / 1
2.06
75.00% covered (warning)
75.00%
3 / 4
 history
0.00% covered (danger)
0.00%
0 / 1
2.06
75.00% covered (warning)
75.00%
3 / 4
 teams
0.00% covered (danger)
0.00%
0 / 1
6.00
0.00% covered (danger)
0.00%
0 / 4
<?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Auth;
class ListController extends Controller
{
    /**
     * Create a new controller instance.
     *
     * @return void
     */
    public function __construct()
    {
        $this->middleware('guest')->except('logout');
    }
    /**
      * Gets the user's proposals list page
      * @return page
      */
    public function myproposals()
    {
        if (!Auth::check()) {
            return redirect('/home');
        }
        $action = "MY_proposalS";
        return view('pages.list', ['action' => $action]);
    }
    /**
     * Gets the user's proposals list page
     * @return page
     */
    public function allproposals()
    {
        $action = "ALL_proposalS";
        return view('pages.list', ['action' => $action]);
    }
    /**
      * Gets the list with the proposals the user is in
      * @return page
      */
    public function proposalsImIn()
    {
        if (!Auth::check()) {
            return redirect('/home');
        }
        $action = "proposalS_IN";
        return view('pages.list', ['action' => $action]);
    }
     /**
      * Gets the list with the proposals the user won
      * @return page
      */
    public function proposalsIWon()
    {
        if (!Auth::check()) {
            return redirect('/home');
        }
        $action = "proposalsIWon";
        return view('pages.list', ['action' => $action]);
    }
    /**
      * Gets the proposal history of user
      * @return page
      */
    public function history()
    {
        if (!Auth::check()) {
            return redirect('/home');
        }
        $action = "history";
        return view('pages.list', ['action' => $action]);
    }
    /**
     * Gets the teams of the user
     * @return page
     */
    public function teams()
    {
        if (!Auth::check()) {
            return redirect('/home');
        }
        $action = "TEAMS";
        return view('pages.list', ['action' => $action]);
    }
}