78 lines
1.5 KiB
PHP
78 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Http\Requests\StoreLedgerRequest;
|
|
use App\Models\Dynamic;
|
|
use App\Models\Ledger;
|
|
use Illuminate\Http\Request;
|
|
use Inertia\Inertia;
|
|
|
|
class LedgerController extends Controller
|
|
{
|
|
/**
|
|
* Display a listing of the resource.
|
|
*/
|
|
public function index()
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Show the form for creating a new resource.
|
|
*/
|
|
public function create()
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Store a newly created resource in storage.
|
|
*/
|
|
public function store(StoreLedgerRequest $request, Dynamic $dynamic)
|
|
{
|
|
$dynamic->ledgers()->create($request->validated());
|
|
|
|
return redirect()->route('dynamics.show', $dynamic);
|
|
}
|
|
|
|
/**
|
|
* Display the specified resource.
|
|
*/
|
|
public function show(Dynamic $dynamic, Ledger $ledger)
|
|
{
|
|
$this->authorize('view', $ledger);
|
|
|
|
$ledger->load('mutations.user', 'mutations.chat.messages.user');
|
|
|
|
return Inertia::render('Ledgers/Show', [
|
|
'dynamic' => $dynamic,
|
|
'ledger' => $ledger,
|
|
]);
|
|
}
|
|
|
|
/**
|
|
* Show the form for editing the specified resource.
|
|
*/
|
|
public function edit(Ledger $ledger)
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Update the specified resource in storage.
|
|
*/
|
|
public function update(Request $request, Ledger $ledger)
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Remove the specified resource from storage.
|
|
*/
|
|
public function destroy(Ledger $ledger)
|
|
{
|
|
//
|
|
}
|
|
}
|