File tree Expand file tree Collapse file tree 2 files changed +24
-3
lines changed
resources/views/my_job_application Expand file tree Collapse file tree 2 files changed +24
-3
lines changed Original file line number Diff line number Diff line change 22
33namespace App \Http \Controllers ;
44
5+ use App \Models \JobApplication ;
56use Illuminate \Http \Request ;
67
78class MyJobApplicationController extends Controller
@@ -22,8 +23,13 @@ public function index()
2223 );
2324 }
2425
25- public function destroy (string $ id )
26+ public function destroy (JobApplication $ myJobApplication )
2627 {
27- //
28+ $ myJobApplication ->delete ();
29+
30+ return redirect ()->back ()->with (
31+ 'success ' ,
32+ 'Job application removed. '
33+ );
2834 }
2935}
Original file line number Diff line number Diff line change 2121 ${{ number_format ($application -> job -> job_applications_avg_expected_salary ) } }
2222 </div >
2323 </div >
24- <div >Right</div >
24+ <div >
25+ <form action =" {{ route (' my-job-applications.destroy' , $application ) } }" method =" POST" >
26+ @csrf
27+ @method (' DELETE ' )
28+ <x-button >Cancel</x-button >
29+ </form >
30+ </div >
2531 </div >
2632 </x-job-card >
2733 @empty
34+ <div class =" rounded-md border border-dashed border-slate-300 p-8" >
35+ <div class =" text-center font-medium" >
36+ No job application yet
37+ </div >
38+ <div class =" text-center" >
39+ Go find some jobs <a class =" text-indigo-500 hover:underline"
40+ href =" {{ route (' jobs.index' ) } }" >here!</a >
41+ </div >
42+ </div >
2843 @endforelse
2944</x-layout >
You can’t perform that action at this time.
0 commit comments