fix back button
This commit is contained in:
@@ -50,6 +50,12 @@ class PbgTaskGoogleSheetsController extends Controller
|
||||
*/
|
||||
public function destroy(string $id)
|
||||
{
|
||||
//
|
||||
try{
|
||||
$data = PbgTaskGoogleSheet::find($id);
|
||||
$data->delete();
|
||||
return response()->json(['message' => 'Data deleted successfully'], 200);
|
||||
}catch(\Exception $e){
|
||||
return response()->json(['message' => 'Failed to delete data'], 500);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Http\Controllers\Data;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\PbgTaskGoogleSheet;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class GoogleSheetsController extends Controller
|
||||
@@ -24,7 +25,8 @@ class GoogleSheetsController extends Controller
|
||||
|
||||
public function show(string $id)
|
||||
{
|
||||
return view('data.google-sheet.show');
|
||||
$data = PbgTaskGoogleSheet::find($id);
|
||||
return view('data.google-sheet.show', compact('data'));
|
||||
}
|
||||
|
||||
public function edit(string $id)
|
||||
|
||||
Reference in New Issue
Block a user