File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
resources/views/livewire/students Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ public function up(): void
20
20
$ table ->string ('email ' )->unique ();
21
21
$ table ->string ('phone ' );
22
22
$ table ->string ('course ' );
23
- $ table ->softDeletes ();
23
+ $ table ->softDeletes (' deleted_at ' , precision: 0 );
24
24
25
25
$ table ->timestamps ();
26
26
});
Original file line number Diff line number Diff line change 1
- <div class =" overflow-x-auto flex flex-col justify- space relative " >
2
- <button class =" absolute top-5 right-5 " >
1
+ <div class =" overflow-x-auto flex flex-col space-y-4 p-8 " >
2
+ <button class =" flex justify-end " >
3
3
<a href =" {{ route (' students.create' ) } }" class =" py-2 px-4 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg bg-blue-600 text-white hover:bg-blue-700 focus:outline-none focus:bg-blue-700" >
4
4
Add Student
5
5
</a >
16
16
</thead >
17
17
<tbody class =" bg-white divide-y divide-gray-200 dark:bg-gray-900 dark:divide-gray-700" >
18
18
@foreach ($students as $student )
19
- <tr class =" hover:bg-gray-50 dark:hover:bg-gray-800 transition-all" >
19
+ <tr wire.id = " {{ $student -> id } } " class =" hover:bg-gray-50 dark:hover:bg-gray-800 transition-all" >
20
20
<td class =" px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-800 dark:text-gray-200" >{{ $student -> firstname } } </td >
21
21
<td class =" px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-800 dark:text-gray-200" >{{ $student -> lastname } } </td >
22
22
23
23
<td class =" px-6 py-4 whitespace-nowrap text-sm text-gray-800 dark:text-gray-200" >{{ $student -> age } } </td >
24
24
<td class =" px-6 py-4 whitespace-nowrap text-sm text-gray-800 dark:text-gray-200" >{{ $student -> address } } </td >
25
25
<td class =" px-6 py-4 whitespace-nowrap text-end text-sm font-medium" >
26
- <button type =" button" class =" py-2 px-4 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg bg-red-600 text-white hover:bg-red-700 focus:outline-none focus:bg-red-700 disabled:opacity-50 disabled:pointer-events-none" wire:click =" deleteStudent({{ $student -> id } } )" >
26
+ <button type =" button" class =" py-2 px-4 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg bg-red-600 text-white hover:bg-red-700 focus:outline-none focus:bg-red-700 disabled:opacity-50 disabled:pointer-events-none" wire:click =" deleteStudent({{ $student -> id } } )" wire.confirm = " Are you sure you want to delete this student? " >
27
27
Delete
28
28
</button >
29
29
</td >
You can’t perform that action at this time.
0 commit comments