diff --git a/README.md b/README.md index e38f78d3..43baf0f5 100644 --- a/README.md +++ b/README.md @@ -1,47 +1,57 @@ # Lion-Framework-Backend ## Install -``` +```powershell composer create-project lion-framework/lion-backend ``` ## Update packages -``` +```powershell composer install ``` ### Libraries used -[Lion-SQL](https://github.com/Sleon4/Lion-SQL) -``` +#####[Lion-SQL](https://github.com/Sleon4/Lion-SQL) +```powershell composer require lion-framework/lion-sql ``` -[Lion-Route](https://github.com/Sleon4/Lion-Route) -``` +#####[Lion-Route](https://github.com/Sleon4/Lion-Route) +```powershell composer require lion-framework/lion-route ``` -[Lion-Mailer](https://github.com/Sleon4/Lion-Mailer) -``` +#####[Lion-Mailer](https://github.com/Sleon4/Lion-Mailer) +```powershell composer require lion-framework/lion-mailer ``` -[Valitron](https://github.com/vlucas/valitron) -``` +#####[Valitron](https://github.com/vlucas/valitron) +```powershell composer require vlucas/valitron ``` -[PHP dotenv](https://github.com/vlucas/phpdotenv) -``` +#####[PHP dotenv](https://github.com/vlucas/phpdotenv) +```powershell composer require vlucas/phpdotenv ``` -[PHRoute](https://github.com/mrjgreen/phroute) -``` +#####[PHRoute](https://github.com/mrjgreen/phroute) +```powershell composer require phroute/phroute ``` -[PHPMailer](https://github.com/PHPMailer/PHPMailer) -``` +#####[PHPMailer](https://github.com/PHPMailer/PHPMailer) +```powershell composer require phpmailer/phpmailer +``` + +#####[PHPSpreadsheet](https://github.com/PHPOffice/PhpSpreadsheet) +```powershell +composer require phpoffice/phpspreadsheet +``` + +#####[Dompdf](https://github.com/dompdf/dompdf) +```powershell +composer require dompdf/dompdf ``` \ No newline at end of file diff --git a/app/Http/Controllers/Example/ExampleController.php b/app/Http/Controllers/Example/ExampleController.php index 7c03a222..0785c995 100644 --- a/app/Http/Controllers/Example/ExampleController.php +++ b/app/Http/Controllers/Example/ExampleController.php @@ -8,7 +8,9 @@ use LionMailer\Attach; use Valitron\Validator; use App\Models\Example\ExampleModel; -use App\Http\Functions\Excel; +use App\Http\Functions\Word; +use App\Http\Functions\Pdf; +use App\Http\Functions\Files; class ExampleController extends Controller { @@ -23,4 +25,18 @@ public function methodExample(): Request { return new Request('success', 'Welcome to example.', self::$form); } + public function createMyWord() { + $this->content(true); + + Word::loadTemplate('public/template/template.docx'); + Word::add([ + 'user_data_email' => self::$form->user_data_email, + 'user_data_password' => self::$form->user_data_password + ]); + + $word_file = Word::saveTemplate('public/', 'nuevo_data', true); + + return new Request('success', 'documento creado.'); + } + } \ No newline at end of file diff --git a/app/Http/Functions/Excel.php b/app/Http/Functions/Excel.php index a9e73ebe..1a0c008d 100644 --- a/app/Http/Functions/Excel.php +++ b/app/Http/Functions/Excel.php @@ -23,10 +23,6 @@ public function __construct() { } - public static function info(): array { - return self::$list_push; - } - public static function new(string $path, string $file_name): string { Files::folder($path); $file_name = Files::rename("{$file_name}.xlsx"); @@ -85,10 +81,10 @@ public static function push(string $value, string $char): void { public static function add(string $index = null, string $value = null): void { if ($index != null && $value != null) { - self::$worksheet->setCellValue($index, self::replace($value)); + self::$worksheet->setCellValue($index, Files::replace($value)); } else { foreach (self::$list_push as $key => $cell) { - self::$worksheet->setCellValue(((string) $key), self::replace($cell)); + self::$worksheet->setCellValue(((string) $key), Files::replace($cell)); } } } @@ -99,32 +95,4 @@ public static function save(string $path, string $file_name): string { return $file_name; } - private static function replace($cell): string { - $cell = str_replace("á", "á", $cell); - $cell = str_replace("é", "é", $cell); - $cell = str_replace("í", "í", $cell); - $cell = str_replace("ó", "ó", $cell); - $cell = str_replace("ú", "ú", $cell); - $cell = str_replace("ñ", "ñ", $cell); - $cell = str_replace("á", "á", $cell); - $cell = str_replace("é", "é", $cell); - $cell = str_replace("Ã", "í", $cell); - $cell = str_replace("ó", "ó", $cell); - $cell = str_replace("ú", "ú", $cell); - $cell = str_replace("ñ", "ñ", $cell); - $cell = str_replace("Ã", "á", $cell); - $cell = str_replace("É", "é", $cell); - $cell = str_replace("Ã", "í", $cell); - $cell = str_replace("Ó", "ó", $cell); - $cell = str_replace("Ú", "ú", $cell); - $cell = str_replace("Ñ", "ñ", $cell); - $cell = str_replace("á", "á", $cell); - $cell = str_replace("é", "é", $cell); - $cell = str_replace("í", "í", $cell); - $cell = str_replace("ó", "ó", $cell); - $cell = str_replace("ú", "ú", $cell); - $cell = str_replace("ñ", "ñ", $cell); - return $cell; - } - } \ No newline at end of file diff --git a/app/Http/Functions/Files.php b/app/Http/Functions/Files.php index 1d771f09..e04a0840 100644 --- a/app/Http/Functions/Files.php +++ b/app/Http/Functions/Files.php @@ -46,12 +46,12 @@ public static function rename(string $file): string { } public static function upload(array $tmps, array $names, string $path): bool { - if (self::folder($path)) { - foreach ($names as $key_name => $name) { - if (!move_uploaded_file($tmps[$key_name], $path . self::rename($name))) { - return false; - break; - } + self::folder($path); + + foreach ($names as $key => $name) { + if (!move_uploaded_file($tmps[$key], $path . self::rename($name))) { + return false; + break; } } @@ -62,6 +62,14 @@ public static function getExtension(string $url_path): string { return (new \SplFileInfo($url_path))->getExtension(); } + public static function getName(string $url_path): string { + return (new \SplFileInfo($url_path))->getBasename("." . self::getExtension($url_path)); + } + + public static function getBasename(string $url_path): string { + return (new \SplFileInfo($url_path))->getBasename(); + } + public static function folder(string $path): bool { return !self::exist([$path]) ? mkdir($path, 0777, true) : true; } @@ -79,4 +87,32 @@ public static function validate(array $files, array $exts): bool { return true; } + public static function replace($cell): string { + $cell = str_replace("á", "á", $cell); + $cell = str_replace("é", "é", $cell); + $cell = str_replace("í", "í", $cell); + $cell = str_replace("ó", "ó", $cell); + $cell = str_replace("ú", "ú", $cell); + $cell = str_replace("ñ", "ñ", $cell); + $cell = str_replace("á", "á", $cell); + $cell = str_replace("é", "é", $cell); + $cell = str_replace("Ã", "í", $cell); + $cell = str_replace("ó", "ó", $cell); + $cell = str_replace("ú", "ú", $cell); + $cell = str_replace("ñ", "ñ", $cell); + $cell = str_replace("Ã", "á", $cell); + $cell = str_replace("É", "é", $cell); + $cell = str_replace("Ã", "í", $cell); + $cell = str_replace("Ó", "ó", $cell); + $cell = str_replace("Ú", "ú", $cell); + $cell = str_replace("Ñ", "ñ", $cell); + $cell = str_replace("á", "á", $cell); + $cell = str_replace("é", "é", $cell); + $cell = str_replace("í", "í", $cell); + $cell = str_replace("ó", "ó", $cell); + $cell = str_replace("ú", "ú", $cell); + $cell = str_replace("ñ", "ñ", $cell); + return $cell; + } + } \ No newline at end of file diff --git a/app/Http/Functions/Pdf.php b/app/Http/Functions/Pdf.php new file mode 100644 index 00000000..b02dcbb5 --- /dev/null +++ b/app/Http/Functions/Pdf.php @@ -0,0 +1,32 @@ +<?php + +//require_once 'dompdf/autoload.inc.php'; + +namespace App\Http\Functions; + +use Dompdf\Dompdf; +use App\Http\Functions\Files; + +class Pdf { + + private static Dompdf $dompdf; + + public function __construct() { + + } + + public static function load(): void { + self::$dompdf = new Dompdf(); + } + + public static function convertToPdf(string $path, string $url): string { + Files::folder($url); + $file_name = $url . Files::getName($path) . ".pdf"; + self::$dompdf->loadHtml(file_get_contents($path)); + self::$dompdf->render(); + file_put_contents($file_name, self::$dompdf->output()); + + return $file_name; + } + +} \ No newline at end of file diff --git a/app/Http/Functions/Word.php b/app/Http/Functions/Word.php new file mode 100644 index 00000000..eb28994d --- /dev/null +++ b/app/Http/Functions/Word.php @@ -0,0 +1,97 @@ +<?php + +namespace App\Http\Functions; + +use PhpOffice\PhpWord\TemplateProcessor; +use PhpOffice\PhpWord\PhpWord; +use PhpOffice\PhpWord\IOFactory; +use PhpOffice\PhpWord\Style\Font; +use PhpOffice\PhpWord\Element\Section; +use App\Http\Functions\Files; + +class Word { + + private static ?TemplateProcessor $templateProcessor = null; + private static ?PhpWord $phpWord = null; + private static ?Section $section = null; + private static ?Font $font = null; + + public function __construct() { + + } + + public static function load(): void { + self::$phpWord = new PhpWord(); + self::$font = new Font(); + } + + public static function save(string $path, string $file_name, array $type = [], bool $rename = false): array { + Files::folder($path); + $list_files = []; + $count = 0; + + foreach ($type as $key => $ext) { + if ($count === 0) { + $file_name = !$rename ? "{$file_name}.{$ext}" : Files::rename("{$file_name}.{$ext}"); + } else { + $file_name = Files::getName($file_name) . ".{$ext}"; + } + + $list_files[$ext] = "{$path}{$file_name}"; + IOFactory::createWriter(self::$phpWord, $key)->save("{$path}{$file_name}"); + + $count++; + } + + return $list_files; + } + + public static function loadTemplate(string $path): void { + self::$font = new Font(); + self::$templateProcessor = new TemplateProcessor($path); + } + + public static function saveTemplate(string $path, string $file_name, bool $option = false): string { + $file_name = !$option ? "{$file_name}.docx" : Files::rename("{$file_name}.docx"); + self::$templateProcessor->saveAs("{$path}{$file_name}"); + self::$templateProcessor = null; + return "{$path}{$file_name}"; + } + + public static function convertToHtml(string $path, string $url, bool $option = false): string { + Files::folder($url); + $file_name = !$option ? Files::getName($path) : Files::getName($path); + $file_name = "{$url}{$file_name}.html"; + + IOFactory::createWriter(IOFactory::load($path), 'HTML')->save($file_name); + return $file_name; + } + + public static function add(array $elements): void { + foreach ($elements as $key => $element) { + self::$templateProcessor->setValue($key, $element); + } + } + + public static function section(array $options = []): void { + self::$section = self::$phpWord->addSection($options); + } + + public static function text(string $text): void { + self::$section->addText($text)->setFontStyle(self::$font); + self::$font = new Font(); + } + + public static function bold(): void { + self::$font->setBold(true); + } + + public static function name(string $name): void { + self::$font->setName($name); + } + + public static function size(int $size): void { + self::$font->setSize($size); + } + +} \ No newline at end of file diff --git a/composer.json b/composer.json index b36d3f45..4f4c6cf7 100644 --- a/composer.json +++ b/composer.json @@ -22,6 +22,8 @@ "vlucas/phpdotenv": "^5.4", "vlucas/valitron": "^1.4", "phpmailer/phpmailer": "^6.6", - "phpoffice/phpspreadsheet": "^1.22" + "phpoffice/phpspreadsheet": "^1.22", + "phpoffice/phpword": "^0.18.3", + "dompdf/dompdf": "^1.2" } } diff --git a/composer.lock b/composer.lock index 76f6f19a..23efa5e8 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,75 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "822cf0f15ef4ad11c6a1638fb075ba74", + "content-hash": "86e0f79adbe034940df903afaebc737b", "packages": [ + { + "name": "dompdf/dompdf", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/dompdf/dompdf.git", + "reference": "60b704331479a69e9bcdb3496da2315b5c4f94fd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dompdf/dompdf/zipball/60b704331479a69e9bcdb3496da2315b5c4f94fd", + "reference": "60b704331479a69e9bcdb3496da2315b5c4f94fd", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-mbstring": "*", + "phenx/php-font-lib": "^0.5.4", + "phenx/php-svg-lib": "^0.3.3 || ^0.4.0", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "mockery/mockery": "^1.3", + "phpunit/phpunit": "^7.5 || ^8 || ^9", + "squizlabs/php_codesniffer": "^3.5" + }, + "suggest": { + "ext-gd": "Needed to process images", + "ext-gmagick": "Improves image processing performance", + "ext-imagick": "Improves image processing performance", + "ext-zlib": "Needed for pdf stream compression" + }, + "type": "library", + "autoload": { + "psr-4": { + "Dompdf\\": "src/" + }, + "classmap": [ + "lib/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1" + ], + "authors": [ + { + "name": "Fabien Ménager", + "email": "fabien.menager@gmail.com" + }, + { + "name": "Brian Sweeney", + "email": "eclecticgeek@gmail.com" + }, + { + "name": "Gabriel Bull", + "email": "me@gabrielbull.com" + } + ], + "description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter", + "homepage": "https://github.com/dompdf/dompdf", + "support": { + "issues": "https://github.com/dompdf/dompdf/issues", + "source": "https://github.com/dompdf/dompdf/tree/v1.2.0" + }, + "time": "2022-02-07T13:02:10+00:00" + }, { "name": "ezyang/htmlpurifier", "version": "v4.14.0", @@ -119,6 +186,68 @@ ], "time": "2021-11-21T21:41:47+00:00" }, + { + "name": "laminas/laminas-escaper", + "version": "2.10.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-escaper.git", + "reference": "58af67282db37d24e584a837a94ee55b9c7552be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/58af67282db37d24e584a837a94ee55b9c7552be", + "reference": "58af67282db37d24e584a837a94ee55b9c7552be", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-mbstring": "*", + "php": "^7.4 || ~8.0.0 || ~8.1.0" + }, + "conflict": { + "zendframework/zend-escaper": "*" + }, + "require-dev": { + "infection/infection": "^0.26.6", + "laminas/laminas-coding-standard": "~2.3.0", + "maglnet/composer-require-checker": "^3.8.0", + "phpunit/phpunit": "^9.5.18", + "psalm/plugin-phpunit": "^0.16.1", + "vimeo/psalm": "^4.22.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Laminas\\Escaper\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Securely and safely escape HTML, HTML attributes, JavaScript, CSS, and URLs", + "homepage": "https://laminas.dev", + "keywords": [ + "escaper", + "laminas" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-escaper/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-escaper/issues", + "rss": "https://github.com/laminas/laminas-escaper/releases.atom", + "source": "https://github.com/laminas/laminas-escaper" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2022-03-08T20:15:36+00:00" + }, { "name": "lion-framework/lion-mailer", "version": "v1.2", @@ -480,6 +609,96 @@ ], "time": "2021-07-05T08:18:36+00:00" }, + { + "name": "phenx/php-font-lib", + "version": "0.5.4", + "source": { + "type": "git", + "url": "https://github.com/dompdf/php-font-lib.git", + "reference": "dd448ad1ce34c63d09baccd05415e361300c35b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dompdf/php-font-lib/zipball/dd448ad1ce34c63d09baccd05415e361300c35b4", + "reference": "dd448ad1ce34c63d09baccd05415e361300c35b4", + "shasum": "" + }, + "require": { + "ext-mbstring": "*" + }, + "require-dev": { + "symfony/phpunit-bridge": "^3 || ^4 || ^5" + }, + "type": "library", + "autoload": { + "psr-4": { + "FontLib\\": "src/FontLib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0" + ], + "authors": [ + { + "name": "Fabien Ménager", + "email": "fabien.menager@gmail.com" + } + ], + "description": "A library to read, parse, export and make subsets of different types of font files.", + "homepage": "https://github.com/PhenX/php-font-lib", + "support": { + "issues": "https://github.com/dompdf/php-font-lib/issues", + "source": "https://github.com/dompdf/php-font-lib/tree/0.5.4" + }, + "time": "2021-12-17T19:44:54+00:00" + }, + { + "name": "phenx/php-svg-lib", + "version": "0.4.1", + "source": { + "type": "git", + "url": "https://github.com/dompdf/php-svg-lib.git", + "reference": "4498b5df7b08e8469f0f8279651ea5de9626ed02" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/4498b5df7b08e8469f0f8279651ea5de9626ed02", + "reference": "4498b5df7b08e8469f0f8279651ea5de9626ed02", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": "^7.1 || ^7.2 || ^7.3 || ^7.4 || ^8.0", + "sabberworm/php-css-parser": "^8.4" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Svg\\": "src/Svg" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0" + ], + "authors": [ + { + "name": "Fabien Ménager", + "email": "fabien.menager@gmail.com" + } + ], + "description": "A library to read, parse and export to PDF SVG files.", + "homepage": "https://github.com/PhenX/php-svg-lib", + "support": { + "issues": "https://github.com/dompdf/php-svg-lib/issues", + "source": "https://github.com/dompdf/php-svg-lib/tree/0.4.1" + }, + "time": "2022-03-07T12:52:04+00:00" + }, { "name": "phpmailer/phpmailer", "version": "v6.6.0", @@ -662,6 +881,118 @@ }, "time": "2022-02-18T12:57:07+00:00" }, + { + "name": "phpoffice/phpword", + "version": "0.18.3", + "source": { + "type": "git", + "url": "https://github.com/PHPOffice/PHPWord.git", + "reference": "be0190cd5d8f95b4be08d5853b107aa4e352759a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPOffice/PHPWord/zipball/be0190cd5d8f95b4be08d5853b107aa4e352759a", + "reference": "be0190cd5d8f95b4be08d5853b107aa4e352759a", + "shasum": "" + }, + "require": { + "ext-xml": "*", + "laminas/laminas-escaper": "^2.2", + "php": "^5.3.3 || ^7.0 || ^8.0" + }, + "require-dev": { + "dompdf/dompdf": "0.8.* || 1.0.*", + "ext-gd": "*", + "ext-zip": "*", + "friendsofphp/php-cs-fixer": "^2.2", + "mpdf/mpdf": "5.7.4 || 6.* || 7.* || 8.*", + "php-coveralls/php-coveralls": "1.1.0 || ^2.0", + "phploc/phploc": "2.* || 3.* || 4.* || 5.* || 6.* || 7.*", + "phpmd/phpmd": "2.*", + "phpunit/phpunit": "^4.8.36 || ^7.0", + "squizlabs/php_codesniffer": "^2.9 || ^3.5", + "tecnickcom/tcpdf": "6.*" + }, + "suggest": { + "dompdf/dompdf": "Allows writing PDF", + "ext-gd2": "Allows adding images", + "ext-xmlwriter": "Allows writing OOXML and ODF", + "ext-xsl": "Allows applying XSL style sheet to headers, to main document part, and to footers of an OOXML template", + "ext-zip": "Allows writing OOXML and ODF" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-develop": "0.19-dev" + } + }, + "autoload": { + "psr-4": { + "PhpOffice\\PhpWord\\": "src/PhpWord" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0" + ], + "authors": [ + { + "name": "Mark Baker" + }, + { + "name": "Gabriel Bull", + "email": "me@gabrielbull.com", + "homepage": "http://gabrielbull.com/" + }, + { + "name": "Franck Lefevre", + "homepage": "https://rootslabs.net/blog/" + }, + { + "name": "Ivan Lanin", + "homepage": "http://ivan.lanin.org" + }, + { + "name": "Roman Syroeshko", + "homepage": "http://ru.linkedin.com/pub/roman-syroeshko/34/a53/994/" + }, + { + "name": "Antoine de Troostembergh" + } + ], + "description": "PHPWord - A pure PHP library for reading and writing word processing documents (OOXML, ODF, RTF, HTML, PDF)", + "homepage": "http://phpoffice.github.io", + "keywords": [ + "ISO IEC 29500", + "OOXML", + "Office Open XML", + "OpenDocument", + "OpenXML", + "PhpOffice", + "PhpWord", + "Rich Text Format", + "WordprocessingML", + "doc", + "docx", + "html", + "odf", + "odt", + "office", + "pdf", + "php", + "reader", + "rtf", + "template", + "template processor", + "word", + "writer" + ], + "support": { + "issues": "https://github.com/PHPOffice/PHPWord/issues", + "source": "https://github.com/PHPOffice/PHPWord/tree/0.18.3" + }, + "time": "2022-02-17T15:40:03+00:00" + }, { "name": "phpoption/phpoption", "version": "1.8.1", @@ -992,6 +1323,59 @@ }, "time": "2017-10-23T01:57:42+00:00" }, + { + "name": "sabberworm/php-css-parser", + "version": "8.4.0", + "source": { + "type": "git", + "url": "https://github.com/sabberworm/PHP-CSS-Parser.git", + "reference": "e41d2140031d533348b2192a83f02d8dd8a71d30" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sabberworm/PHP-CSS-Parser/zipball/e41d2140031d533348b2192a83f02d8dd8a71d30", + "reference": "e41d2140031d533348b2192a83f02d8dd8a71d30", + "shasum": "" + }, + "require": { + "ext-iconv": "*", + "php": ">=5.6.20" + }, + "require-dev": { + "codacy/coverage": "^1.4", + "phpunit/phpunit": "^4.8.36" + }, + "suggest": { + "ext-mbstring": "for parsing UTF-8 CSS" + }, + "type": "library", + "autoload": { + "psr-4": { + "Sabberworm\\CSS\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Raphael Schweikert" + } + ], + "description": "Parser for CSS Files written in PHP", + "homepage": "https://www.sabberworm.com/blog/2010/6/10/php-css-parser", + "keywords": [ + "css", + "parser", + "stylesheet" + ], + "support": { + "issues": "https://github.com/sabberworm/PHP-CSS-Parser/issues", + "source": "https://github.com/sabberworm/PHP-CSS-Parser/tree/8.4.0" + }, + "time": "2021-12-11T13:40:54+00:00" + }, { "name": "symfony/polyfill-ctype", "version": "v1.25.0", diff --git a/routes/web.php b/routes/web.php index 576df554..1221e013 100644 --- a/routes/web.php +++ b/routes/web.php @@ -24,7 +24,7 @@ Route::middleware(['before' => 'no-auth'], function() { Route::prefix('autenticar', function() { - Route::post('ingreso', [ExampleController::class, 'methodExample']); + Route::post('ingreso', [ExampleController::class, 'createMyWord']); }); });