From 99203498e8c92c3d0de7c078bfcd69d879bae11d Mon Sep 17 00:00:00 2001 From: Rafieh <59613343+Rafieh1377@users.noreply.github.com> Date: Thu, 16 Jan 2020 15:27:52 +0330 Subject: [PATCH] edit feature added --- app/Http/Controllers/PostController.php | 3 +- public/src/js/app.js | 7 +++++ resources/views/dashboard.blade.php | 23 +++++++++++++- resources/views/layouts/master.blade.php | 38 +++++++++++++++--------- 4 files changed, 55 insertions(+), 16 deletions(-) create mode 100644 public/src/js/app.js diff --git a/app/Http/Controllers/PostController.php b/app/Http/Controllers/PostController.php index 173738d..3aba9f0 100644 --- a/app/Http/Controllers/PostController.php +++ b/app/Http/Controllers/PostController.php @@ -36,5 +36,6 @@ public function getDeletePost($post_id) $post->delete(); return redirect()->route('dashboard')->with(['message' => 'The post successfully deleted!']); } + } - + \ No newline at end of file diff --git a/public/src/js/app.js b/public/src/js/app.js new file mode 100644 index 0000000..8ff7cea --- /dev/null +++ b/public/src/js/app.js @@ -0,0 +1,7 @@ +$('.post') + .find('.interaction') + .find('a') + .eq(2) + .on('clink', function() { + console.log("it works!"); + }); diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php index 0b72551..476aefb 100644 --- a/resources/views/dashboard.blade.php +++ b/resources/views/dashboard.blade.php @@ -1,7 +1,9 @@ @extends('layouts.master') @section('content') -

Your information
id : {{auth()->user()->id}} , first name : {{auth()->user()->first_name}} , email : {{auth()->user()->email}}

+

Your information +
id : {{auth()->user()->id}} , first name : {{auth()->user()->first_name}} , email : + {{auth()->user()->email}}


@include('includes.dashboardNavigation') @include('includes.message-block') @@ -45,4 +47,23 @@ + + @endsection \ No newline at end of file diff --git a/resources/views/layouts/master.blade.php b/resources/views/layouts/master.blade.php index 4b00e0f..f801095 100644 --- a/resources/views/layouts/master.blade.php +++ b/resources/views/layouts/master.blade.php @@ -1,20 +1,30 @@ - - - + + - + - - @yield('title') - - - + + + + + + @yield('title') + + + + @include('includes.header') -
- @yield('content') -
- - +
+ @yield('content') +
+ + + + + + \ No newline at end of file