99 lines
2.5 KiB
PHP
99 lines
2.5 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Admin;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use Illuminate\Http\Request;
|
|
|
|
class AllegatoController extends Controller
|
|
{
|
|
/**
|
|
* Display a listing of the resource.
|
|
*/
|
|
public function index()
|
|
{
|
|
return view('admin.allegati.index', [
|
|
'title' => 'Allegati',
|
|
'breadcrumb' => [
|
|
'Dashboard' => route('admin.dashboard'),
|
|
'Allegati' => ''
|
|
]
|
|
]);
|
|
}
|
|
|
|
/**
|
|
* Show the form for creating a new resource.
|
|
*/
|
|
public function create()
|
|
{
|
|
return view('admin.allegati.create', [
|
|
'title' => 'Nuovo Allegato',
|
|
'breadcrumb' => [
|
|
'Dashboard' => route('admin.dashboard'),
|
|
'Allegati' => route('admin.allegati.index'),
|
|
'Nuovo Allegato' => ''
|
|
]
|
|
]);
|
|
}
|
|
|
|
/**
|
|
* Store a newly created resource in storage.
|
|
*/
|
|
public function store(Request $request)
|
|
{
|
|
// TODO: Implement store logic
|
|
return redirect()->route('admin.allegati.index')
|
|
->with('success', 'Allegato creato con successo.');
|
|
}
|
|
|
|
/**
|
|
* Display the specified resource.
|
|
*/
|
|
public function show(string $id)
|
|
{
|
|
return view('admin.allegati.show', [
|
|
'title' => 'Dettaglio Allegato',
|
|
'breadcrumb' => [
|
|
'Dashboard' => route('admin.dashboard'),
|
|
'Allegati' => route('admin.allegati.index'),
|
|
'Dettaglio' => ''
|
|
]
|
|
]);
|
|
}
|
|
|
|
/**
|
|
* Show the form for editing the specified resource.
|
|
*/
|
|
public function edit(string $id)
|
|
{
|
|
return view('admin.allegati.edit', [
|
|
'title' => 'Modifica Allegato',
|
|
'breadcrumb' => [
|
|
'Dashboard' => route('admin.dashboard'),
|
|
'Allegati' => route('admin.allegati.index'),
|
|
'Modifica' => ''
|
|
]
|
|
]);
|
|
}
|
|
|
|
/**
|
|
* Update the specified resource in storage.
|
|
*/
|
|
public function update(Request $request, string $id)
|
|
{
|
|
// TODO: Implement update logic
|
|
return redirect()->route('admin.allegati.index')
|
|
->with('success', 'Allegato aggiornato con successo.');
|
|
}
|
|
|
|
/**
|
|
* Remove the specified resource from storage.
|
|
*/
|
|
public function destroy(string $id)
|
|
{
|
|
// TODO: Implement destroy logic
|
|
return redirect()->route('admin.allegati.index')
|
|
->with('success', 'Allegato eliminato con successo.');
|
|
}
|
|
}
|