diff --git a/app/controllers/ProjectsController.php b/app/controllers/ProjectsController.php new file mode 100644 index 0000000..481dcf5 --- /dev/null +++ b/app/controllers/ProjectsController.php @@ -0,0 +1,103 @@ +save(); + + } + + + /** + * Display the specified resource. + * + * @param int $id + * @return Response + */ + public function show($id) + { + $project = Project::find($id); + + return View::make('projects.project')->with('project', $project); + } + + + /** + * Show the form for editing the specified resource. + * + * @param int $id + * @return Response + */ + public function edit($id) + { + $project = Project::find($id); + + return View::make('projects.edit')->with('project', $project); + } + + + /** + * Update the specified resource in storage. + * + * @param int $id + * @return Response + */ + public function update($id) + { + $project = Project::find($id); + + $data = \Input::all(); + + $project->title = \Input::get('title'); + + $project->save(); + + } + + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return Response + */ + public function destroy($id) + { + Project::delete($id); + } + + +} diff --git a/app/models/Project.php b/app/models/Project.php index e69de29..ff16362 100644 --- a/app/models/Project.php +++ b/app/models/Project.php @@ -0,0 +1,9 @@ + 'auth'), function() Route::get('users', array('as' => 'users', 'uses' => 'UserController@index')); Route::get('mentors', array('as' => 'mentors', 'uses' => 'UserController@mentors')); Route::get('mentees', array('as' => 'mentees', 'uses' => 'UserController@mentees')); + +}); + +Route::group(array('before' => 'auth'), function() +{ + Route::resource('projects', 'ProjectsController'); }); /** diff --git a/app/views/projects/home.blade.php b/app/views/projects/home.blade.php new file mode 100644 index 0000000..26f4d04 --- /dev/null +++ b/app/views/projects/home.blade.php @@ -0,0 +1,109 @@ + + +
+ +