/**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show()
 {
     $user = Auth::user();
     $email = $user->email;
     $array['index'] = Skills::where('email', $email)->get();
     return view('skills', $array);
 }
 public function getEdit($aboutMeId)
 {
     if (!ACL::hasPermission('skills', 'edit')) {
         return redirect(route('skills'))->withErrors(['You don\'t have permission for edit the skill.']);
     }
     $skill = Skills::where('skillsId', '=', $aboutMeId)->first();
     return view('admin.skills.edit')->with(compact('skill'));
 }
示例#3
0
文件: routes.php 项目: ArianoDev/fbch
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::get('/', function () {
    // prelevo l'elenco delle squadre
    $teams = \App\Team::all();
    return view('home', ['teams' => $teams]);
});
Route::get('team/{slug}', function ($slug) {
    // prelevo l'oggetto TEAM con la lista dei giocatori associati
    $team = \App\Team::where('slug', '=', $slug)->firstOrFail();
    return view('players', ['players' => $team->players]);
});
Route::get('player/{id}', function ($player_id) {
    // prelevo tutte le informazioni del PLAYER con id=$player_id
    $player = \App\Skills::where('player_id', $player_id)->firstOrFail();
    return view('player_info', ['data' => $player]);
});
Route::get('fantateam', function () {
    // prelevo l'elenco delle fanta-squadre
    $teams = \App\Fantateam::all();
    return view('fantateams', ['teams' => $teams]);
});
Route::get('fantateam/{slug}', function ($slug) {
    $fantateam = \App\Fantateam::where('slug', '=', $slug)->firstOrFail();
    return view('players', ['players' => $fantateam->players]);
});
Route::get('gestione/fantateams', function () {
    return view('gestione_fantateams');
});
示例#4
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     Skills::where('id', $id)->delete();
     return back()->withSuccess('Skill deleted successfully!');
 }