diff --git a/app/Controllers/CodeController.php b/app/Controllers/CodeController.php index 6d1f152..7191a77 100644 --- a/app/Controllers/CodeController.php +++ b/app/Controllers/CodeController.php @@ -32,4 +32,13 @@ public function index(): void 'codes' => $codes, ]); } + + public function show($id): void + { + $code = Code::find($id); + + view('admin.codes.show', [ + 'code' => $code, + ]); + } } diff --git a/resources/views/admin/codes/show.blade.php b/resources/views/admin/codes/show.blade.php new file mode 100644 index 0000000..eb895b4 --- /dev/null +++ b/resources/views/admin/codes/show.blade.php @@ -0,0 +1,52 @@ +@extends("admin.layouts.master") +@section("title", "Salam Admin") + +@section("content") +
+
+
+
+
+
+

کاربران

+
+
+ + + + + + + + + + + + + + @foreach($codes as $code) + + + + + + + + + + @endforeach + +
ایدیایدی کاربرکدعنوانایجاد شده دراپدیت شده در
{{ $code["id"] }}{{ $code["user_id"] }}{{ substr($code["code"], 0, 25) }}{{ substr($code["title"], 0, 25) }}{{ $code["created_at"] }}{{ $code["updated_at"] }} + نمایش +
+
+
+
+
+
+
+@endsection + +@section("script") + +@endsection \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index e7ca7cc..6e6ed5a 100755 --- a/routes/web.php +++ b/routes/web.php @@ -40,6 +40,7 @@ Flight::group('/codes', function () { Flight::route('GET /', [new CodeController, 'index']); + Flight::route('GET /show/@id', [new CodeController, 'show']); }); }, [new Admin]);