Files
pollux/app/Http/Controllers/PeopleController.php
T
2018-09-24 18:51:49 +02:00

50 lines
1.2 KiB
PHP

<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Database\Eloquent\Collection;
use App\Person;
class PeopleController extends Controller
{
public function index()
{
$people = Person::orderBy('name_or_company')->get();
return view('people.index', compact('people'));
}
public function show(Person $person)
{
$memberStates = $person->memberStates;
$targets = $person->targets;
$actuals = $person->actuals;
return view('people.show', compact('person', 'memberStates', 'targets',
'actuals'));
}
// Show the form for creating a new person
public function create() {}
// Store a new person in the database
public function store() {}
// Show the form for editing a existing person
public function edit(Person $person) {
return view('people.edit', compact('person'));
}
// Store the edited data of an existing person in the database
public function update(Person $person) {}
// Show the delete dialog for a given person
public function delete(Person $person) {}
// Actualla delete a person from the database
public function destroy(Person $person) {}
}