Sistema web para crear proyecto web nuevo

This commit is contained in:
2020-07-03 17:21:55 -04:00
parent af3507bda5
commit ad3952501f
53 changed files with 2437 additions and 0 deletions

14
resources/routes/api.php Normal file
View File

@ -0,0 +1,14 @@
<?php
$folder = implode(DIRECTORY_SEPARATOR, [
__DIR__,
'api'
]);
if (file_exists($folder)) {
$files = new DirectoryIterator($folder);
foreach ($files as $file) {
if ($file->isDir()) {
continue;
}
include_once $file->getRealPath();
}
}

View File

@ -0,0 +1,13 @@
<?php
use ProVM\Projects\Common\Controller\API\Create;
$app->group('/create/{project}', function($app) {
$app->get('/folder', [Create::class, 'createFolder']);
$app->get('/subfolders', [Create::class, 'createSubfolders']);
$app->post('/composer', [Create::class, 'addComposer']);
$app->get('/files', [Create::class, 'addFiles']);
$app->group('/git', function($app) {
$app->get('/init', [Create::class, 'gitInit']);
$app->get('/push', [Create::class, 'gitPush']);
});
});

View File

@ -0,0 +1,6 @@
<?php
use ProVM\Projects\Common\Controller\API\Dependencies;
$app->group('/dependencies', function($app) {
$app->get('/search', [Dependencies::class, 'search']);
});

View File

@ -0,0 +1,2 @@
<?php
include_once $__environment . '.php';

18
resources/routes/web.php Normal file
View File

@ -0,0 +1,18 @@
<?php
use ProVM\Projects\Common\Controller\Web\Home;
$folder = implode(DIRECTORY_SEPARATOR, [
__DIR__,
'web'
]);
if (file_exists($folder)) {
$files = new DirectoryIterator($folder);
foreach ($files as $file) {
if ($file->isDir()) {
continue;
}
include_once $file->getRealPath();
}
}
$app->get('/', Home::class);

View File

@ -0,0 +1,8 @@
<?php
use ProVM\Projects\Common\Controller\Web\Create;
$app->group('/create', function($app) {
$app->post('/2', [Create::class, 'step2']);
$app->post('/3', [Create::class, 'step3']);
$app->get('[/]', Create::class);
});

View File

@ -0,0 +1,24 @@
<?php
use ProVM\Projects\Common\Controller\Web\Project;
$app->group('/project/{project}', function($app) {
$app->group('/views', function($app) {
$app->group('/add', function($app) {
$app->get('[/]', [Project::class, 'addView']);
$app->post('[/]', [Project::class, 'doAddView']);
});
});
$app->group('/controllers', function($app) {
$app->group('/add', function($app) {
$app->get('[/]', [Project::class, 'addController']);
$app->post('[/]', [Project::class, 'doAddController']);
});
});
$app->group('/routes', function($app) {
$app->group('/add', function($app) {
$app->get('[/]', [Project::class, 'addRoute']);
$app->post('[/]', [Project::class, 'doAddRoute']);
});
});
$app->get('[/]', Project::class);
});

View File

@ -0,0 +1,6 @@
<?php
use ProVM\Projects\Common\Controller\Web\Home;
$app->group('/step', function($app) {
$app->post('/2', [Home::class, 'step2']);
});