- Added standard Laravel directory structure and configuration. - Included Svelte and Tailwind configuration for the admin interface. - Added core PHPUnit and testing scripts.
26 lines
504 B
PHP
26 lines
504 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Admin\Forms;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Models\Form;
|
|
use Illuminate\View\View;
|
|
|
|
/**
|
|
* Controller for displaying a listing of forms.
|
|
*/
|
|
class FormIndexController extends Controller
|
|
{
|
|
/**
|
|
* Display a listing of forms.
|
|
*
|
|
* @return \Illuminate\View\View
|
|
*/
|
|
public function __invoke(): View
|
|
{
|
|
return view('admin.forms.index', [
|
|
'forms' => Form::withCount('submissions')->get(),
|
|
]);
|
|
}
|
|
}
|