update
This commit is contained in:
1 parent
d7e8df6876
commit
40de56c27b
5119 files changed
+552560
-24
No files matched your search
+25
@@ -0,0 +1,25 @@
|
||||
<?= "<?php\n" ?>
|
||||
|
||||
namespace <?= $class_data->getNamespace(); ?>;
|
||||
|
||||
<?= $class_data->getUseStatements(); ?>
|
||||
|
||||
<?= $class_data->getClassDeclaration(); ?>
|
||||
|
||||
{
|
||||
<?= $generator->generateRouteForControllerMethod($route_path, $route_name); ?>
|
||||
public function <?= $method_name ?>(): <?php if ($with_template) { ?>Response<?php } else { ?>JsonResponse<?php } ?>
|
||||
|
||||
{
|
||||
<?php if ($with_template) { ?>
|
||||
return $this->render('<?= $template_name ?>', [
|
||||
'controller_name' => '<?= $class_data->getClassName() ?>',
|
||||
]);
|
||||
<?php } else { ?>
|
||||
return $this->json([
|
||||
'message' => 'Welcome to your new controller!',
|
||||
'path' => '<?= $relative_path; ?>',
|
||||
]);
|
||||
<?php } ?>
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
<?= "<?php\n" ?>
|
||||
|
||||
namespace <?= $class_data->getNamespace(); ?>;
|
||||
|
||||
<?= $class_data->getUseStatements(); ?>
|
||||
|
||||
<?= $class_data->getClassDeclaration(); ?>
|
||||
|
||||
{
|
||||
public function testIndex(): void
|
||||
{
|
||||
$client = static::createClient();
|
||||
$client->request('GET', '<?= $route_path; ?>');
|
||||
|
||||
self::assertResponseIsSuccessful();
|
||||
}
|
||||
}
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
<?= $helper->getHeadPrintCode("Hello $class_name!"); ?>
|
||||
|
||||
{% block body %}
|
||||
<style>
|
||||
.example-wrapper { margin: 1em auto; max-width: 800px; width: 95%; font: 18px/1.5 sans-serif; }
|
||||
.example-wrapper code { background: #F5F5F5; padding: 2px 6px; }
|
||||
</style>
|
||||
|
||||
<div class="example-wrapper">
|
||||
<h1>Hello {{ controller_name }}! ✅</h1>
|
||||
|
||||
This friendly message is coming from:
|
||||
<ul>
|
||||
<li>Your controller at <code><?= $root_directory ?>/<?= $controller_path ?></code></li>
|
||||
<li>Your template at <code><?= $root_directory ?>/<?= $relative_path ?></code></li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user