Skip to content
Snippets Groups Projects
Commit 37cddc34 authored by SARPCAN ERCAN's avatar SARPCAN ERCAN :hourglass_flowing_sand:
Browse files

page bird marche

parent 46695a2f
Branches
No related merge requests found
......@@ -74,4 +74,22 @@ class BirdController extends Controller
/**
* Show the details of the bird
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function show( Request $request, int $id )
{
return view('bird')
->with('bird',Bird::findOrFail($id))
->with('message',$request->session()->get('message'));
}
}
......@@ -194,7 +194,7 @@ class UserController extends Controller
}
/**
* Show the birds page
* Show the users birds
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
......
No preview for this file type
......@@ -19,7 +19,9 @@
</ul>
</section>
<section>
<a href="bird/{{ $bird->id }}">Details</a> -
<a href="deletebird/{{ $bird->id }}">Delete</a> -
</section>
</article>
@endforeach
......
......@@ -41,6 +41,7 @@ Route::prefix('admin')->middleware('auth.myuser')->group( function() {
Route::post('savebird', [BirdController::class,'savebird'])->name('savebird');
Route::get('birdlist', [UserController::class,'birdlist'])->name('birdlist');
Route::get('deletebird/{id}', [BirdController::class,'deletebird'])->name('deletebird');
Route::get('bird/{id}', [BirdController::class,'show'])->name('bird');
});
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment