示例#1
0
 /**
  * Show the application dashboard to the user.
  *
  * @return Response
  */
 public function getIndex()
 {
     $title = 'Dashboard';
     $user = $this->user;
     $plans = Plan::all();
     return view('home.index', compact('title', 'user', 'plans'));
 }
示例#2
0
 public function addNewTask(Request $request)
 {
     $plans = Plan::all();
     $plan = $plans->where('startdate', $request->plan)->first();
     $goal = $plan->goals->where('body', $request->goal)->first();
     $objective = $goal->objectives->where('body', $request->objective)->first();
     $action = $objective->actions->where('body', $request->action)->first();
     $task = new Task();
     $task->body = $request->body;
     $action->addTask($task);
     return back();
 }
示例#3
0
 /**
  * @return \Illuminate\View\View
  */
 public function getPlans()
 {
     $title = 'Plans';
     $plans = Plan::all();
     return view('admin.plans', compact('title', 'plans'));
 }
 public function pricing()
 {
     $title = 'Pricing';
     $plans = Plan::all();
     return view('pages.pricing', compact('title', 'plans'));
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     return Plan::all();
 }
 public function getAllPlans()
 {
     return Plan::all();
 }