├── .editorconfig ├── .github ├── .kodiak.toml ├── ISSUE_TEMPLATE │ ├── Bug.md │ ├── Feature.md │ └── Question.md ├── dependabot.yml └── workflows │ ├── deploy-php-7.4.yml │ ├── deploy-php-8.0.yml │ ├── deploy-php-8.1.yml │ ├── deploy-php-8.2.yml │ ├── deploy-php-8.3.yml │ ├── deploy-php-exec.yml │ ├── deploy-php-show.yml │ ├── deploy-php.yml │ └── vercel.yml ├── .gitignore ├── LICENSE ├── Makefile ├── README.md ├── cache ├── .gitignore ├── .vercelignore ├── api │ └── index.ts ├── package-lock.json ├── package.json ├── tsconfig.json └── vercel.json ├── php-7.4 ├── .gitignore ├── api │ └── index.php └── vercel.json ├── php-8.0 ├── .gitignore ├── api │ └── index.php └── vercel.json ├── php-8.1 ├── .gitignore ├── api │ └── index.php └── vercel.json ├── php-8.2 ├── .gitignore ├── api │ └── index.php └── vercel.json ├── php-8.3 ├── .gitignore ├── api │ └── index.php └── vercel.json ├── php-codeigniter ├── .editorconfig ├── .gitignore ├── README.md ├── api │ ├── application │ │ ├── .htaccess │ │ ├── cache │ │ │ └── index.html │ │ ├── config │ │ │ ├── autoload.php │ │ │ ├── config.php │ │ │ ├── constants.php │ │ │ ├── database.php │ │ │ ├── doctypes.php │ │ │ ├── foreign_chars.php │ │ │ ├── hooks.php │ │ │ ├── index.html │ │ │ ├── memcached.php │ │ │ ├── migration.php │ │ │ ├── mimes.php │ │ │ ├── profiler.php │ │ │ ├── routes.php │ │ │ ├── smileys.php │ │ │ └── user_agents.php │ │ ├── controllers │ │ │ ├── Welcome.php │ │ │ └── index.html │ │ ├── core │ │ │ └── index.html │ │ ├── helpers │ │ │ └── index.html │ │ ├── hooks │ │ │ └── index.html │ │ ├── index.html │ │ ├── language │ │ │ ├── english │ │ │ │ └── index.html │ │ │ └── index.html │ │ ├── libraries │ │ │ └── index.html │ │ ├── logs │ │ │ └── index.html │ │ ├── models │ │ │ └── index.html │ │ ├── third_party │ │ │ └── index.html │ │ └── views │ │ │ ├── errors │ │ │ ├── cli │ │ │ │ ├── error_404.php │ │ │ │ ├── error_db.php │ │ │ │ ├── error_exception.php │ │ │ │ ├── error_general.php │ │ │ │ ├── error_php.php │ │ │ │ └── index.html │ │ │ ├── html │ │ │ │ ├── error_404.php │ │ │ │ ├── error_db.php │ │ │ │ ├── error_exception.php │ │ │ │ ├── error_general.php │ │ │ │ ├── error_php.php │ │ │ │ └── index.html │ │ │ └── index.html │ │ │ ├── index.html │ │ │ └── welcome_message.php │ ├── index.php │ └── system │ │ ├── .htaccess │ │ ├── core │ │ ├── Benchmark.php │ │ ├── CodeIgniter.php │ │ ├── Common.php │ │ ├── Config.php │ │ ├── Controller.php │ │ ├── Exceptions.php │ │ ├── Hooks.php │ │ ├── Input.php │ │ ├── Lang.php │ │ ├── Loader.php │ │ ├── Log.php │ │ ├── Model.php │ │ ├── Output.php │ │ ├── Router.php │ │ ├── Security.php │ │ ├── URI.php │ │ ├── Utf8.php │ │ ├── compat │ │ │ ├── hash.php │ │ │ ├── index.html │ │ │ ├── mbstring.php │ │ │ ├── password.php │ │ │ └── standard.php │ │ └── index.html │ │ ├── database │ │ ├── DB.php │ │ ├── DB_cache.php │ │ ├── DB_driver.php │ │ ├── DB_forge.php │ │ ├── DB_query_builder.php │ │ ├── DB_result.php │ │ ├── DB_utility.php │ │ ├── drivers │ │ │ ├── cubrid │ │ │ │ ├── cubrid_driver.php │ │ │ │ ├── cubrid_forge.php │ │ │ │ ├── cubrid_result.php │ │ │ │ ├── cubrid_utility.php │ │ │ │ └── index.html │ │ │ ├── ibase │ │ │ │ ├── ibase_driver.php │ │ │ │ ├── ibase_forge.php │ │ │ │ ├── ibase_result.php │ │ │ │ ├── ibase_utility.php │ │ │ │ └── index.html │ │ │ ├── index.html │ │ │ ├── mssql │ │ │ │ ├── index.html │ │ │ │ ├── mssql_driver.php │ │ │ │ ├── mssql_forge.php │ │ │ │ ├── mssql_result.php │ │ │ │ └── mssql_utility.php │ │ │ ├── mysql │ │ │ │ ├── index.html │ │ │ │ ├── mysql_driver.php │ │ │ │ ├── mysql_forge.php │ │ │ │ ├── mysql_result.php │ │ │ │ └── mysql_utility.php │ │ │ ├── mysqli │ │ │ │ ├── index.html │ │ │ │ ├── mysqli_driver.php │ │ │ │ ├── mysqli_forge.php │ │ │ │ ├── mysqli_result.php │ │ │ │ └── mysqli_utility.php │ │ │ ├── oci8 │ │ │ │ ├── index.html │ │ │ │ ├── oci8_driver.php │ │ │ │ ├── oci8_forge.php │ │ │ │ ├── oci8_result.php │ │ │ │ └── oci8_utility.php │ │ │ ├── odbc │ │ │ │ ├── index.html │ │ │ │ ├── odbc_driver.php │ │ │ │ ├── odbc_forge.php │ │ │ │ ├── odbc_result.php │ │ │ │ └── odbc_utility.php │ │ │ ├── pdo │ │ │ │ ├── index.html │ │ │ │ ├── pdo_driver.php │ │ │ │ ├── pdo_forge.php │ │ │ │ ├── pdo_result.php │ │ │ │ ├── pdo_utility.php │ │ │ │ └── subdrivers │ │ │ │ │ ├── index.html │ │ │ │ │ ├── pdo_4d_driver.php │ │ │ │ │ ├── pdo_4d_forge.php │ │ │ │ │ ├── pdo_cubrid_driver.php │ │ │ │ │ ├── pdo_cubrid_forge.php │ │ │ │ │ ├── pdo_dblib_driver.php │ │ │ │ │ ├── pdo_dblib_forge.php │ │ │ │ │ ├── pdo_firebird_driver.php │ │ │ │ │ ├── pdo_firebird_forge.php │ │ │ │ │ ├── pdo_ibm_driver.php │ │ │ │ │ ├── pdo_ibm_forge.php │ │ │ │ │ ├── pdo_informix_driver.php │ │ │ │ │ ├── pdo_informix_forge.php │ │ │ │ │ ├── pdo_mysql_driver.php │ │ │ │ │ ├── pdo_mysql_forge.php │ │ │ │ │ ├── pdo_oci_driver.php │ │ │ │ │ ├── pdo_oci_forge.php │ │ │ │ │ ├── pdo_odbc_driver.php │ │ │ │ │ ├── pdo_odbc_forge.php │ │ │ │ │ ├── pdo_pgsql_driver.php │ │ │ │ │ ├── pdo_pgsql_forge.php │ │ │ │ │ ├── pdo_sqlite_driver.php │ │ │ │ │ ├── pdo_sqlite_forge.php │ │ │ │ │ ├── pdo_sqlsrv_driver.php │ │ │ │ │ └── pdo_sqlsrv_forge.php │ │ │ ├── postgre │ │ │ │ ├── index.html │ │ │ │ ├── postgre_driver.php │ │ │ │ ├── postgre_forge.php │ │ │ │ ├── postgre_result.php │ │ │ │ └── postgre_utility.php │ │ │ ├── sqlite │ │ │ │ ├── index.html │ │ │ │ ├── sqlite_driver.php │ │ │ │ ├── sqlite_forge.php │ │ │ │ ├── sqlite_result.php │ │ │ │ └── sqlite_utility.php │ │ │ ├── sqlite3 │ │ │ │ ├── index.html │ │ │ │ ├── sqlite3_driver.php │ │ │ │ ├── sqlite3_forge.php │ │ │ │ ├── sqlite3_result.php │ │ │ │ └── sqlite3_utility.php │ │ │ └── sqlsrv │ │ │ │ ├── index.html │ │ │ │ ├── sqlsrv_driver.php │ │ │ │ ├── sqlsrv_forge.php │ │ │ │ ├── sqlsrv_result.php │ │ │ │ └── sqlsrv_utility.php │ │ └── index.html │ │ ├── fonts │ │ ├── index.html │ │ └── texb.ttf │ │ ├── helpers │ │ ├── array_helper.php │ │ ├── captcha_helper.php │ │ ├── cookie_helper.php │ │ ├── date_helper.php │ │ ├── directory_helper.php │ │ ├── download_helper.php │ │ ├── email_helper.php │ │ ├── file_helper.php │ │ ├── form_helper.php │ │ ├── html_helper.php │ │ ├── index.html │ │ ├── inflector_helper.php │ │ ├── language_helper.php │ │ ├── number_helper.php │ │ ├── path_helper.php │ │ ├── security_helper.php │ │ ├── smiley_helper.php │ │ ├── string_helper.php │ │ ├── text_helper.php │ │ ├── typography_helper.php │ │ ├── url_helper.php │ │ └── xml_helper.php │ │ ├── index.html │ │ ├── language │ │ ├── english │ │ │ ├── calendar_lang.php │ │ │ ├── date_lang.php │ │ │ ├── db_lang.php │ │ │ ├── email_lang.php │ │ │ ├── form_validation_lang.php │ │ │ ├── ftp_lang.php │ │ │ ├── imglib_lang.php │ │ │ ├── index.html │ │ │ ├── migration_lang.php │ │ │ ├── number_lang.php │ │ │ ├── pagination_lang.php │ │ │ ├── profiler_lang.php │ │ │ ├── unit_test_lang.php │ │ │ └── upload_lang.php │ │ └── index.html │ │ └── libraries │ │ ├── Cache │ │ ├── Cache.php │ │ ├── drivers │ │ │ ├── Cache_apc.php │ │ │ ├── Cache_dummy.php │ │ │ ├── Cache_file.php │ │ │ ├── Cache_memcached.php │ │ │ ├── Cache_redis.php │ │ │ ├── Cache_wincache.php │ │ │ └── index.html │ │ └── index.html │ │ ├── Calendar.php │ │ ├── Cart.php │ │ ├── Driver.php │ │ ├── Email.php │ │ ├── Encrypt.php │ │ ├── Encryption.php │ │ ├── Form_validation.php │ │ ├── Ftp.php │ │ ├── Image_lib.php │ │ ├── Javascript.php │ │ ├── Javascript │ │ ├── Jquery.php │ │ └── index.html │ │ ├── Migration.php │ │ ├── Pagination.php │ │ ├── Parser.php │ │ ├── Profiler.php │ │ ├── Session │ │ ├── Session.php │ │ ├── SessionHandlerInterface.php │ │ ├── Session_driver.php │ │ ├── drivers │ │ │ ├── Session_database_driver.php │ │ │ ├── Session_files_driver.php │ │ │ ├── Session_memcached_driver.php │ │ │ ├── Session_redis_driver.php │ │ │ └── index.html │ │ └── index.html │ │ ├── Table.php │ │ ├── Trackback.php │ │ ├── Typography.php │ │ ├── Unit_test.php │ │ ├── Upload.php │ │ ├── User_agent.php │ │ ├── Xmlrpc.php │ │ ├── Xmlrpcs.php │ │ ├── Zip.php │ │ └── index.html ├── composer.json ├── contributing.md ├── index.php ├── license.txt ├── now.json └── readme.rst ├── php-composer ├── .gitignore ├── .vercelignore ├── api │ └── index.php ├── composer.json ├── composer.lock └── vercel.json ├── php-exec ├── .gitignore ├── api │ ├── exec.php │ ├── index.php │ └── system.php └── vercel.json ├── php-framework-lumen ├── .env.example ├── .gitignore ├── .nowignore ├── .styleci.yml ├── app │ ├── Console │ │ ├── Commands │ │ │ └── .gitkeep │ │ └── Kernel.php │ ├── Events │ │ ├── Event.php │ │ └── ExampleEvent.php │ ├── Exceptions │ │ └── Handler.php │ ├── Http │ │ ├── Controllers │ │ │ ├── Controller.php │ │ │ └── ExampleController.php │ │ └── Middleware │ │ │ ├── Authenticate.php │ │ │ └── ExampleMiddleware.php │ ├── Jobs │ │ ├── ExampleJob.php │ │ └── Job.php │ ├── Listeners │ │ └── ExampleListener.php │ ├── Providers │ │ ├── AppServiceProvider.php │ │ ├── AuthServiceProvider.php │ │ └── EventServiceProvider.php │ └── User.php ├── artisan ├── bootstrap │ └── app.php ├── composer.json ├── composer.lock ├── database │ ├── factories │ │ └── ModelFactory.php │ ├── migrations │ │ └── .gitkeep │ └── seeds │ │ └── DatabaseSeeder.php ├── now.json ├── public │ ├── .htaccess │ └── index.php ├── resources │ └── views │ │ └── .gitkeep ├── routes │ └── web.php └── storage │ ├── app │ └── .gitignore │ ├── framework │ ├── cache │ │ ├── .gitignore │ │ └── data │ │ │ └── .gitignore │ └── views │ │ └── .gitignore │ └── logs │ └── .gitignore ├── php-framework-nette ├── .gitignore ├── .nowignore ├── assets │ ├── denied │ │ ├── .htaccess │ │ ├── checker.js │ │ └── web.config │ ├── failed.gif │ ├── info.gif │ ├── logo.png │ ├── nginx │ │ └── checker.php │ ├── passed.gif │ ├── rewrite │ │ ├── .htaccess │ │ ├── checker.js │ │ └── web.config │ └── warning.gif ├── checker.php ├── composer.json ├── composer.lock ├── dump.php ├── index.php ├── now.json ├── phpinfo.php └── tracy.php ├── php-framework-phalcon ├── index.php └── now.json ├── php-framework-slim ├── .gitignore ├── .nowignore ├── composer.json ├── composer.lock ├── index.php └── now.json ├── php-framework-symfony-microservice ├── .env ├── .gitignore ├── .nowignore ├── bin │ └── console ├── composer.json ├── composer.lock ├── config │ ├── bootstrap.php │ ├── bundles.php │ ├── packages │ │ ├── cache.yaml │ │ ├── dev │ │ │ └── routing.yaml │ │ ├── framework.yaml │ │ ├── routing.yaml │ │ └── test │ │ │ ├── framework.yaml │ │ │ └── routing.yaml │ ├── routes.yaml │ └── services.yaml ├── now.json ├── public │ └── index.php ├── src │ ├── Controller │ │ └── DefaultController.php │ └── Kernel.php └── symfony.lock ├── php-laminas ├── .gitattributes ├── .gitignore ├── .vercelignore ├── api │ └── index.php ├── composer.json ├── composer.lock ├── config │ ├── application.config.php │ ├── autoload │ │ ├── .gitignore │ │ ├── README.md │ │ ├── development.local.php.dist │ │ ├── global.php │ │ ├── laminas-developer-tools.local-development.php │ │ └── local.php.dist │ ├── development.config.php.dist │ └── modules.config.php ├── data │ └── cache │ │ └── .gitkeep ├── module │ └── Application │ │ ├── config │ │ └── module.config.php │ │ ├── src │ │ ├── Controller │ │ │ └── IndexController.php │ │ └── Module.php │ │ ├── test │ │ └── Controller │ │ │ └── IndexControllerTest.php │ │ └── view │ │ ├── application │ │ └── index │ │ │ └── index.phtml │ │ ├── error │ │ ├── 404.phtml │ │ └── index.phtml │ │ └── layout │ │ └── layout.phtml ├── public │ ├── css │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ ├── bootstrap.min.css.map │ │ └── style.css │ ├── img │ │ ├── favicon.ico │ │ └── laminas-logo.svg │ ├── index.php │ └── js │ │ ├── bootstrap.js │ │ ├── bootstrap.js.map │ │ ├── bootstrap.min.js │ │ ├── bootstrap.min.js.map │ │ └── jquery-3.5.1.min.js └── vercel.json ├── php-laravel ├── .editorconfig ├── .env.example ├── .gitattributes ├── .gitignore ├── .styleci.yml ├── .vercelignore ├── api │ └── index.php ├── app │ ├── Article.php │ ├── Console │ │ └── Kernel.php │ ├── Exceptions │ │ └── Handler.php │ ├── Http │ │ ├── Controllers │ │ │ ├── BlogController.php │ │ │ └── Controller.php │ │ ├── Kernel.php │ │ └── Middleware │ │ │ ├── Authenticate.php │ │ │ ├── CheckForMaintenanceMode.php │ │ │ ├── EncryptCookies.php │ │ │ ├── RedirectIfAuthenticated.php │ │ │ ├── TrimStrings.php │ │ │ ├── TrustProxies.php │ │ │ └── VerifyCsrfToken.php │ ├── Providers │ │ ├── AppServiceProvider.php │ │ ├── AuthServiceProvider.php │ │ ├── BroadcastServiceProvider.php │ │ ├── EventServiceProvider.php │ │ └── RouteServiceProvider.php │ └── User.php ├── artisan ├── bootstrap │ ├── app.php │ └── cache │ │ └── .gitignore ├── composer.json ├── composer.lock ├── config │ ├── app.php │ ├── auth.php │ ├── broadcasting.php │ ├── cache.php │ ├── cors.php │ ├── database.php │ ├── filesystems.php │ ├── hashing.php │ ├── logging.php │ ├── mail.php │ ├── phase.php │ ├── queue.php │ ├── services.php │ ├── session.php │ └── view.php ├── database │ ├── .gitignore │ ├── factories │ │ ├── ArticleFactory.php │ │ └── UserFactory.php │ ├── migrations │ │ ├── 2014_10_12_000000_create_users_table.php │ │ └── 2019_08_19_000000_create_failed_jobs_table.php │ └── seeds │ │ └── DatabaseSeeder.php ├── package-lock.json ├── package.json ├── phpunit.xml ├── public │ ├── .htaccess │ ├── css │ │ └── app.css │ ├── favicon.ico │ ├── index.php │ ├── js │ │ ├── app-client.js │ │ ├── app-client.js.LICENSE.txt │ │ ├── app-server.js │ │ └── app-server.js.LICENSE.txt │ ├── mix-manifest.json │ └── robots.txt ├── resources │ ├── js │ │ ├── app.js │ │ ├── bootstrap.js │ │ ├── layouts │ │ │ ├── ArticleLayout.vue │ │ │ ├── MainLayout.vue │ │ │ └── index.js │ │ ├── pages │ │ │ └── BlogController │ │ │ │ ├── AboutPage.vue │ │ │ │ ├── ContactPage.vue │ │ │ │ ├── HomePage.vue │ │ │ │ └── SingleArticle.vue │ │ ├── router.js │ │ └── store │ │ │ ├── index.js │ │ │ └── modules │ │ │ └── articles.js │ ├── lang │ │ └── en │ │ │ ├── auth.php │ │ │ ├── pagination.php │ │ │ ├── passwords.php │ │ │ └── validation.php │ ├── sass │ │ └── app.scss │ └── views │ │ └── parts │ │ └── head.blade.php ├── routes │ ├── api.php │ ├── channels.php │ ├── console.php │ └── web.php ├── server.php ├── storage │ ├── app │ │ ├── .gitignore │ │ └── public │ │ │ └── .gitignore │ ├── framework │ │ ├── .gitignore │ │ ├── cache │ │ │ ├── .gitignore │ │ │ └── data │ │ │ │ └── .gitignore │ │ ├── sessions │ │ │ └── .gitignore │ │ ├── testing │ │ │ └── .gitignore │ │ └── views │ │ │ └── .gitignore │ └── logs │ │ └── .gitignore ├── tailwind.config.js ├── vercel.json ├── webpack.mix.js └── yarn.lock ├── php-lumen ├── .env.example ├── .gitignore ├── .styleci.yml ├── .vercelignore ├── api │ └── index.php ├── app │ ├── Console │ │ ├── Commands │ │ │ └── .gitkeep │ │ └── Kernel.php │ ├── Events │ │ ├── Event.php │ │ └── ExampleEvent.php │ ├── Exceptions │ │ └── Handler.php │ ├── Http │ │ ├── Controllers │ │ │ ├── Controller.php │ │ │ └── ExampleController.php │ │ └── Middleware │ │ │ ├── Authenticate.php │ │ │ └── ExampleMiddleware.php │ ├── Jobs │ │ ├── ExampleJob.php │ │ └── Job.php │ ├── Listeners │ │ └── ExampleListener.php │ ├── Providers │ │ ├── AppServiceProvider.php │ │ ├── AuthServiceProvider.php │ │ └── EventServiceProvider.php │ └── User.php ├── artisan ├── bootstrap │ └── app.php ├── composer.json ├── composer.lock ├── database │ ├── factories │ │ └── ModelFactory.php │ ├── migrations │ │ └── .gitkeep │ └── seeds │ │ └── DatabaseSeeder.php ├── public │ ├── .htaccess │ └── index.php ├── resources │ └── views │ │ └── .gitkeep ├── routes │ └── web.php ├── storage │ ├── app │ │ └── .gitignore │ ├── framework │ │ ├── cache │ │ │ ├── .gitignore │ │ │ └── data │ │ │ │ └── .gitignore │ │ └── views │ │ │ └── .gitignore │ └── logs │ │ └── .gitignore ├── tests │ └── .gitkeep └── vercel.json ├── php-nette-tracy ├── .gitignore ├── .vercelignore ├── api │ ├── assets │ │ ├── denied │ │ │ ├── .htaccess │ │ │ ├── checker.js │ │ │ └── web.config │ │ ├── failed.gif │ │ ├── info.gif │ │ ├── logo.png │ │ ├── nginx │ │ │ └── checker.php │ │ ├── passed.gif │ │ ├── rewrite │ │ │ ├── .htaccess │ │ │ ├── checker.js │ │ │ └── web.config │ │ └── warning.gif │ ├── checker.php │ ├── dump.php │ ├── index.php │ ├── phpinfo.php │ └── tracy.php ├── composer.json ├── composer.lock └── vercel.json ├── php-phalcon ├── .gitignore ├── api │ └── index.php └── vercel.json ├── php-satis ├── .gitignore ├── .vercelignore ├── composer.json ├── composer.lock ├── index.php ├── satis.json └── vercel.json ├── php-show ├── .gitignore ├── api │ ├── api │ │ ├── index.php │ │ └── users.php │ ├── ext │ │ ├── ds.php │ │ ├── gd.php │ │ ├── index.php │ │ └── phalcon.php │ ├── file.php │ ├── hello.php │ ├── index.php │ ├── ini │ │ └── index.php │ ├── libs.php │ └── test.php └── vercel.json ├── php-slim ├── .gitignore ├── .nowignore ├── api │ └── index.php ├── composer.json ├── composer.lock └── vercel.json ├── php-sqlite ├── .gitignore ├── api │ └── index.php └── vercel.json ├── php-symfony-micro1 ├── .env ├── .gitignore ├── .vercelignore ├── api │ └── index.php ├── bin │ └── console ├── composer.json ├── composer.lock ├── config │ ├── bootstrap.php │ ├── bundles.php │ ├── packages │ │ ├── cache.yaml │ │ ├── dev │ │ │ └── routing.yaml │ │ ├── framework.yaml │ │ ├── routing.yaml │ │ └── test │ │ │ ├── framework.yaml │ │ │ └── routing.yaml │ ├── routes.yaml │ └── services.yaml ├── public │ └── index.php ├── src │ ├── Controller │ │ └── DefaultController.php │ └── Kernel.php ├── symfony.lock └── vercel.json ├── php-symfony-micro2 ├── .gitignore ├── .vercelignore ├── api │ └── index.php ├── composer.json ├── composer.lock └── vercel.json ├── php-wordpress └── wp-content │ └── themes │ └── twentytwenty │ ├── package-lock.json │ └── package.json └── php ├── .gitignore ├── api └── index.php ├── index.html └── vercel.json /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.{html}] 12 | indent_style = tab 13 | indent_size = tab 14 | tab_width = 4 15 | 16 | [*.{js,ts,json,yml,yaml,md}] 17 | indent_style = space 18 | indent_size = 2 19 | -------------------------------------------------------------------------------- /.github/.kodiak.toml: -------------------------------------------------------------------------------- 1 | version = 1 2 | 3 | [merge] 4 | automerge_label = "automerge" 5 | blacklist_title_regex = "^WIP.*" 6 | blacklist_labels = ["WIP"] 7 | method = "rebase" 8 | delete_branch_on_merge = true 9 | notify_on_conflict = true 10 | optimistic_updates = false 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Bug.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 🐛 3 | about: Something is not working as expected! 4 | --- 5 | 6 | # Bug report 7 | 8 | - Example: xyz 9 | - URL: Yes (*.now.sh) / No 10 | - Repository: Yes / No 11 | 12 | ## Description 13 | 14 | 15 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Feature.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 🚀 3 | about: I would appreciate new example or something! 4 | --- 5 | 6 | # Feature Request 7 | 8 | 9 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Question ❓ 3 | about: Ask about anything! 4 | --- 5 | 6 | # Question 7 | 8 | 9 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | -------------------------------------------------------------------------------- /.github/workflows/deploy-php-7.4.yml: -------------------------------------------------------------------------------- 1 | name: Deploy php 7.4 2 | 3 | on: 4 | push: 5 | paths: 6 | - 'php-7.4/**' 7 | branches: 8 | - "master" 9 | 10 | concurrency: 11 | group: php-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} 12 | cancel-in-progress: true 13 | 14 | jobs: 15 | deploy: 16 | name: Deploy 17 | uses: ./.github/workflows/vercel.yml 18 | secrets: inherit 19 | with: 20 | projectId: "prj_O8ddYFcAyG1ihzTZCFxA8xXPrtEe" 21 | projectPath: "php-7.4" 22 | -------------------------------------------------------------------------------- /.github/workflows/deploy-php-8.0.yml: -------------------------------------------------------------------------------- 1 | name: Deploy php 8.0 2 | 3 | on: 4 | push: 5 | paths: 6 | - 'php-8.0/**' 7 | branches: 8 | - "master" 9 | 10 | concurrency: 11 | group: php-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} 12 | cancel-in-progress: true 13 | 14 | jobs: 15 | deploy: 16 | name: Deploy 17 | uses: ./.github/workflows/vercel.yml 18 | secrets: inherit 19 | with: 20 | projectId: "prj_WlfX8kyVFZxsKSI26LHBLLtzSNB1" 21 | projectPath: "php-8.0" 22 | -------------------------------------------------------------------------------- /.github/workflows/deploy-php-8.1.yml: -------------------------------------------------------------------------------- 1 | name: Deploy php 8.1 2 | 3 | on: 4 | push: 5 | paths: 6 | - 'php-8.1/**' 7 | branches: 8 | - "master" 9 | 10 | concurrency: 11 | group: php-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} 12 | cancel-in-progress: true 13 | 14 | jobs: 15 | deploy: 16 | name: Deploy 17 | uses: ./.github/workflows/vercel.yml 18 | secrets: inherit 19 | with: 20 | projectId: "prj_jsuaId53jLmpXeuhdXAdqrv97aO3" 21 | projectPath: "php-8.1" 22 | -------------------------------------------------------------------------------- /.github/workflows/deploy-php-8.2.yml: -------------------------------------------------------------------------------- 1 | name: Deploy php 8.2 2 | 3 | on: 4 | push: 5 | paths: 6 | - 'php-8.2/**' 7 | branches: 8 | - "master" 9 | 10 | concurrency: 11 | group: php-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} 12 | cancel-in-progress: true 13 | 14 | jobs: 15 | deploy: 16 | name: Deploy 17 | uses: ./.github/workflows/vercel.yml 18 | secrets: inherit 19 | with: 20 | projectId: "prj_wXRdr49SVDdikjwyTZ7V05tx76wm" 21 | projectPath: "php-8.2" 22 | -------------------------------------------------------------------------------- /.github/workflows/deploy-php-8.3.yml: -------------------------------------------------------------------------------- 1 | name: Deploy php 8.3 2 | 3 | on: 4 | push: 5 | paths: 6 | - 'php-8.3/**' 7 | branches: 8 | - "master" 9 | 10 | concurrency: 11 | group: php-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} 12 | cancel-in-progress: true 13 | 14 | jobs: 15 | deploy: 16 | name: Deploy 17 | uses: ./.github/workflows/vercel.yml 18 | secrets: inherit 19 | with: 20 | projectId: "prj_8Sr1ZZvQgIfYaChCekr4yv3byJnV" 21 | projectPath: "php-8.3" 22 | -------------------------------------------------------------------------------- /.github/workflows/deploy-php-exec.yml: -------------------------------------------------------------------------------- 1 | name: Deploy php exec 2 | 3 | on: 4 | push: 5 | paths: 6 | - 'php-exec/**' 7 | branches: 8 | - "master" 9 | 10 | concurrency: 11 | group: php-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} 12 | cancel-in-progress: true 13 | 14 | jobs: 15 | deploy: 16 | name: Deploy 17 | uses: ./.github/workflows/vercel.yml 18 | secrets: inherit 19 | with: 20 | projectId: "prj_1twKaUwaHQHV0M3YfoLY626vwIaQ" 21 | projectPath: "php-exec" 22 | -------------------------------------------------------------------------------- /.github/workflows/deploy-php-show.yml: -------------------------------------------------------------------------------- 1 | name: Deploy php show 2 | 3 | on: 4 | push: 5 | paths: 6 | - 'php-show/**' 7 | branches: 8 | - "master" 9 | 10 | concurrency: 11 | group: php-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} 12 | cancel-in-progress: true 13 | 14 | jobs: 15 | deploy: 16 | name: Deploy 17 | uses: ./.github/workflows/vercel.yml 18 | secrets: inherit 19 | with: 20 | projectId: "prj_wD0FhGcrHvcmKPmZqcjXtHPIfLE4" 21 | projectPath: "php-show" 22 | -------------------------------------------------------------------------------- /.github/workflows/deploy-php.yml: -------------------------------------------------------------------------------- 1 | name: Deploy php 2 | 3 | on: 4 | push: 5 | paths: 6 | - 'php/**' 7 | branches: 8 | - "master" 9 | 10 | concurrency: 11 | group: php-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} 12 | cancel-in-progress: true 13 | 14 | jobs: 15 | deploy: 16 | name: Deploy 17 | uses: ./.github/workflows/vercel.yml 18 | secrets: inherit 19 | with: 20 | projectId: "QmUCScRKnp9ciJXA5Rucs9Wx6p3i4YnWvbKUqtvZNX8PcH" 21 | projectPath: "php" 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Vercel 2 | .vercel -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Juicy(fx) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: deploy 2 | .PHONY: php php-composer 3 | .PHONY: php-laminas php-laravel php-lumen php-nette-tracy php-phalcon php-satis php-slim php-symfony-micro1 php-symfony-micro2 4 | 5 | deploy: 6 | cd ${PROJECT} && vc -c -n ${PROJECT} -S xorg ${NOW} 7 | 8 | deploy-all: 9 | $(MAKE) cache 10 | $(MAKE) php 11 | $(MAKE) php-composer 12 | $(MAKE) php-laminas 13 | $(MAKE) php-laravel 14 | $(MAKE) php-lumen 15 | $(MAKE) php-nette-tracy 16 | $(MAKE) php-phalcon 17 | $(MAKE) php-satis 18 | $(MAKE) php-slim 19 | $(MAKE) php-sqlite 20 | $(MAKE) php-symfony-micro1 21 | $(MAKE) php-symfony-micro2 22 | 23 | ################## 24 | # Basic examples # 25 | ################## 26 | 27 | php: 28 | PROJECT=php $(MAKE) deploy 29 | 30 | php-composer: 31 | PROJECT=php-composer $(MAKE) deploy 32 | 33 | ################## 34 | # Basic examples # 35 | ################## 36 | 37 | php-laminas: 38 | PROJECT=php-laminas $(MAKE) deploy 39 | 40 | php-laravel: 41 | PROJECT=php-laravel $(MAKE) deploy 42 | 43 | php-lumen: 44 | PROJECT=php-lumen $(MAKE) deploy 45 | 46 | php-nette-tracy: 47 | PROJECT=php-nette-tracy $(MAKE) deploy 48 | 49 | php-phalcon: 50 | PROJECT=php-phalcon $(MAKE) deploy 51 | 52 | php-satis: 53 | PROJECT=php-satis $(MAKE) deploy 54 | 55 | php-slim: 56 | PROJECT=php-slim $(MAKE) deploy 57 | 58 | php-sqlite: 59 | PROJECT=php-sqlite $(MAKE) deploy 60 | 61 | php-symfony-micro1: 62 | PROJECT=php-symfony-micro1 $(MAKE) deploy 63 | 64 | php-symfony-micro2: 65 | PROJECT=php-symfony-micro2 $(MAKE) deploy 66 | -------------------------------------------------------------------------------- /cache/.gitignore: -------------------------------------------------------------------------------- 1 | # NodeJS 2 | /node_modules 3 | 4 | # App 5 | /dist 6 | 7 | # Vercel 8 | .vercel 9 | -------------------------------------------------------------------------------- /cache/.vercelignore: -------------------------------------------------------------------------------- 1 | /dist 2 | /node_modules 3 | -------------------------------------------------------------------------------- /cache/api/index.ts: -------------------------------------------------------------------------------- 1 | import { NowRequest, NowResponse } from '@vercel/node'; 2 | 3 | const CACHE_BROWSER = 60 * 60 * 24 * 1; // 1 day 4 | const CACHE_CDN = 60 * 60 * 24 * 5; // 5 days 5 | 6 | export default async function handler(req: NowRequest, res: NowResponse) { 7 | console.log("HTTP", req.url); 8 | 9 | // Apply optimistic CORS 10 | res.setHeader("Access-Control-Allow-Origin", '*'); 11 | res.setHeader("Access-Control-Allow-Methods", '*'); 12 | res.setHeader("Access-Control-Allow-Headers", '*'); 13 | 14 | // OPTIONS request 15 | if (req.method === 'OPTIONS') { 16 | res.statusCode = 200; 17 | res.end(); 18 | return 19 | } 20 | 21 | const output = { 22 | timestamp: Date.now(), 23 | date: new Date().toISOString() 24 | } 25 | 26 | res.setHeader('Content-Type', 'application/json') 27 | res.setHeader('Cache-Control', `max-age=${CACHE_BROWSER}, s-maxage=${CACHE_CDN}, public`); 28 | res.send(JSON.stringify(output)); 29 | } 30 | -------------------------------------------------------------------------------- /cache/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vercel-example-cache", 3 | "version": "0.0.0", 4 | "scripts": { 5 | "compile": "tsc", 6 | "watch": "tsc --watch" 7 | }, 8 | "devDependencies": { 9 | "@vercel/node": "^1.8.4", 10 | "typescript": "^4.0.5" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /cache/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, 4 | "esModuleInterop": true, 5 | "target": "ES2018", 6 | "module": "CommonJS", 7 | "outDir": "dist", 8 | "sourceMap": false, 9 | "declaration": true, 10 | "typeRoots": [ 11 | "./node_modules/@types" 12 | ], 13 | "noFallthroughCasesInSwitch": true, 14 | "noImplicitReturns": true, 15 | "noEmitOnError": true, 16 | "noUnusedLocals": true, 17 | "noUnusedParameters": true, 18 | "removeComments": true, 19 | "preserveConstEnums": true 20 | }, 21 | "include": [ 22 | "api/**/*" 23 | ], 24 | "exclude": [ 25 | "dist" 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /cache/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "regions": ["bru1"], 3 | "rewrites": [ 4 | { "source": "/(.*)", "destination": "/api/index.ts" } 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /php-7.4/.gitignore: -------------------------------------------------------------------------------- 1 | # Vercel 2 | .vercel 3 | -------------------------------------------------------------------------------- /php-7.4/api/index.php: -------------------------------------------------------------------------------- 1 | 2 | Require all denied 3 | 4 | 5 | Deny from all 6 | -------------------------------------------------------------------------------- /php-codeigniter/api/application/cache/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/application/config/hooks.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/application/config/memcached.php: -------------------------------------------------------------------------------- 1 | array( 15 | 'hostname' => '127.0.0.1', 16 | 'port' => '11211', 17 | 'weight' => '1', 18 | ), 19 | ); 20 | -------------------------------------------------------------------------------- /php-codeigniter/api/application/config/profiler.php: -------------------------------------------------------------------------------- 1 | 19 | * @see https://codeigniter.com/user_guide/general/urls.html 20 | */ 21 | public function index() 22 | { 23 | $this->load->view('welcome_message'); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /php-codeigniter/api/application/controllers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/application/core/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/application/helpers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/application/hooks/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/application/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/application/language/english/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/application/language/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/application/libraries/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/application/logs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/application/models/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/application/third_party/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/application/views/errors/cli/error_404.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | An uncaught Exception was encountered 4 | 5 | Type: 6 | Message: 7 | Filename: getFile(), "\n"; ?> 8 | Line Number: getLine(); ?> 9 | 10 | 11 | 12 | Backtrace: 13 | getTrace() as $error): ?> 14 | 15 | File: 16 | Line: 17 | Function: 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /php-codeigniter/api/application/views/errors/cli/error_general.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | A PHP Error was encountered 4 | 5 | Severity: 6 | Message: 7 | Filename: 8 | Line Number: 9 | 10 | 11 | 12 | Backtrace: 13 | 14 | 15 | File: 16 | Line: 17 | Function: 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /php-codeigniter/api/application/views/errors/cli/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/application/views/errors/html/error_404.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 404 Page Not Found 8 | 57 | 58 | 59 |
60 |

61 | 62 |
63 | 64 | -------------------------------------------------------------------------------- /php-codeigniter/api/application/views/errors/html/error_db.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | Database Error 8 | 57 | 58 | 59 |
60 |

61 | 62 |
63 | 64 | -------------------------------------------------------------------------------- /php-codeigniter/api/application/views/errors/html/error_exception.php: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 | 7 |

An uncaught Exception was encountered

8 | 9 |

Type:

10 |

Message:

11 |

Filename: getFile(); ?>

12 |

Line Number: getLine(); ?>

13 | 14 | 15 | 16 |

Backtrace:

17 | getTrace() as $error): ?> 18 | 19 | 20 | 21 |

22 | File:
23 | Line:
24 | Function: 25 |

26 | 27 | 28 | 29 | 30 | 31 | 32 |
-------------------------------------------------------------------------------- /php-codeigniter/api/application/views/errors/html/error_general.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | Error 8 | 57 | 58 | 59 |
60 |

61 | 62 |
63 | 64 | -------------------------------------------------------------------------------- /php-codeigniter/api/application/views/errors/html/error_php.php: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 | 7 |

A PHP Error was encountered

8 | 9 |

Severity:

10 |

Message:

11 |

Filename:

12 |

Line Number:

13 | 14 | 15 | 16 |

Backtrace:

17 | 18 | 19 | 20 | 21 |

22 | File:
23 | Line:
24 | Function: 25 |

26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 |
-------------------------------------------------------------------------------- /php-codeigniter/api/application/views/errors/html/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/application/views/errors/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/application/views/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/system/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | Require all denied 3 | 4 | 5 | Deny from all 6 | -------------------------------------------------------------------------------- /php-codeigniter/api/system/core/compat/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/system/core/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/system/database/drivers/cubrid/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/system/database/drivers/ibase/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/system/database/drivers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/system/database/drivers/mssql/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/system/database/drivers/mysql/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/system/database/drivers/mysqli/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/system/database/drivers/oci8/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/system/database/drivers/odbc/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/system/database/drivers/pdo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/system/database/drivers/pdo/subdrivers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/system/database/drivers/postgre/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/system/database/drivers/sqlite/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/system/database/drivers/sqlite3/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/system/database/drivers/sqlsrv/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/system/database/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/system/fonts/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/system/fonts/texb.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/contributte/vercel-examples/3a45994af19370e0958554d3c79ef7c755f263aa/php-codeigniter/api/system/fonts/texb.ttf -------------------------------------------------------------------------------- /php-codeigniter/api/system/helpers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/system/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/system/language/english/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/system/language/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/system/libraries/Cache/drivers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/system/libraries/Cache/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/system/libraries/Javascript/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/system/libraries/Session/drivers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/system/libraries/Session/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/api/system/libraries/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 Forbidden 5 | 6 | 7 | 8 |

Directory access is forbidden.

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /php-codeigniter/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "The CodeIgniter framework", 3 | "name": "codeigniter/framework", 4 | "type": "project", 5 | "homepage": "https://codeigniter.com", 6 | "license": "MIT", 7 | "support": { 8 | "forum": "http://forum.codeigniter.com/", 9 | "wiki": "https://github.com/bcit-ci/CodeIgniter/wiki", 10 | "slack": "https://codeigniterchat.slack.com", 11 | "source": "https://github.com/bcit-ci/CodeIgniter" 12 | }, 13 | "require": { 14 | "php": ">=5.3.7" 15 | }, 16 | "suggest": { 17 | "paragonie/random_compat": "Provides better randomness in PHP 5.x" 18 | }, 19 | "require-dev": { 20 | "mikey179/vfsStream": "1.1.*", 21 | "phpunit/phpunit": "4.* || 5.*" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /php-codeigniter/license.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 - 2019, British Columbia Institute of Technology 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /php-codeigniter/now.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "public": true, 4 | "functions": { 5 | "api/*.php": { 6 | "runtime": "now-php@0.0.9" 7 | } 8 | }, 9 | "routes": [ 10 | { 11 | "src": "/assets/(.*)", 12 | "headers": { 13 | "cache-control": "s-maxage=604800" 14 | }, 15 | "dest": "/assets/$1" 16 | }, 17 | { 18 | "src": "/(.*)", 19 | "dest": "api/index.php" 20 | } 21 | ] 22 | } -------------------------------------------------------------------------------- /php-composer/.gitignore: -------------------------------------------------------------------------------- 1 | # PHP 2 | /vendor 3 | 4 | # Vercel 5 | .vercel -------------------------------------------------------------------------------- /php-composer/.vercelignore: -------------------------------------------------------------------------------- 1 | # PHP 2 | /vendor 3 | 4 | # Vercel 5 | .vercel -------------------------------------------------------------------------------- /php-composer/api/index.php: -------------------------------------------------------------------------------- 1 | auth = $auth; 26 | } 27 | 28 | /** 29 | * Handle an incoming request. 30 | * 31 | * @param \Illuminate\Http\Request $request 32 | * @param \Closure $next 33 | * @param string|null $guard 34 | * @return mixed 35 | */ 36 | public function handle($request, Closure $next, $guard = null) 37 | { 38 | if ($this->auth->guard($guard)->guest()) { 39 | return response('Unauthorized.', 401); 40 | } 41 | 42 | return $next($request); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /php-framework-lumen/app/Http/Middleware/ExampleMiddleware.php: -------------------------------------------------------------------------------- 1 | app['auth']->viaRequest('api', function ($request) { 34 | if ($request->input('api_token')) { 35 | return User::where('api_token', $request->input('api_token'))->first(); 36 | } 37 | }); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /php-framework-lumen/app/Providers/EventServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 16 | 'App\Listeners\ExampleListener', 17 | ], 18 | ]; 19 | } 20 | -------------------------------------------------------------------------------- /php-framework-lumen/app/User.php: -------------------------------------------------------------------------------- 1 | make( 32 | 'Illuminate\Contracts\Console\Kernel' 33 | ); 34 | 35 | exit($kernel->handle(new ArgvInput, new ConsoleOutput)); 36 | -------------------------------------------------------------------------------- /php-framework-lumen/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "epicdata/now-lumen-core", 3 | "description": "Add now.sh support for the Lumen framework", 4 | "keywords": ["framework", "laravel", "lumen", "zeit", "now"], 5 | "license": "MIT", 6 | "type": "project", 7 | "require": { 8 | "php": "^7.2", 9 | "laravel/lumen-framework": "^6.0" 10 | }, 11 | "require-dev": { 12 | "fzaninotto/faker": "^1.4", 13 | "phpunit/phpunit": "^8.0", 14 | "mockery/mockery": "^1.0" 15 | }, 16 | "autoload": { 17 | "classmap": [ 18 | "database/seeds", 19 | "database/factories" 20 | ], 21 | "psr-4": { 22 | "App\\": "app/" 23 | } 24 | }, 25 | "autoload-dev": { 26 | "classmap": [ 27 | "tests/" 28 | ] 29 | }, 30 | "scripts": { 31 | "post-root-package-install": [ 32 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 33 | ] 34 | }, 35 | "config": { 36 | "preferred-install": "dist", 37 | "sort-packages": true, 38 | "optimize-autoloader": true 39 | }, 40 | "minimum-stability": "dev", 41 | "prefer-stable": true 42 | } 43 | -------------------------------------------------------------------------------- /php-framework-lumen/database/factories/ModelFactory.php: -------------------------------------------------------------------------------- 1 | define(App\User::class, function (Faker\Generator $faker) { 15 | return [ 16 | 'name' => $faker->name, 17 | 'email' => $faker->email, 18 | ]; 19 | }); 20 | -------------------------------------------------------------------------------- /php-framework-lumen/database/migrations/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/contributte/vercel-examples/3a45994af19370e0958554d3c79ef7c755f263aa/php-framework-lumen/database/migrations/.gitkeep -------------------------------------------------------------------------------- /php-framework-lumen/database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call('UsersTableSeeder'); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /php-framework-lumen/now.json: -------------------------------------------------------------------------------- 1 | { 2 | "builds": [ 3 | { 4 | "src": "public/index.php", 5 | "use": "now-php" 6 | } 7 | ], 8 | "routes": [ 9 | { "src": "/(.*)", "dest": "public/index.php" } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /php-framework-lumen/public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Handle Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /php-framework-lumen/public/index.php: -------------------------------------------------------------------------------- 1 | run(); 29 | -------------------------------------------------------------------------------- /php-framework-lumen/resources/views/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/contributte/vercel-examples/3a45994af19370e0958554d3c79ef7c755f263aa/php-framework-lumen/resources/views/.gitkeep -------------------------------------------------------------------------------- /php-framework-lumen/routes/web.php: -------------------------------------------------------------------------------- 1 | get('/', function () use ($router) { 15 | return $router->app->version(); 16 | }); 17 | -------------------------------------------------------------------------------- /php-framework-lumen/storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /php-framework-lumen/storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /php-framework-lumen/storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /php-framework-lumen/storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /php-framework-lumen/storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /php-framework-nette/.gitignore: -------------------------------------------------------------------------------- 1 | vendor -------------------------------------------------------------------------------- /php-framework-nette/.nowignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | -------------------------------------------------------------------------------- /php-framework-nette/assets/denied/.htaccess: -------------------------------------------------------------------------------- 1 | Order Allow,Deny 2 | Deny from all 3 | -------------------------------------------------------------------------------- /php-framework-nette/assets/denied/checker.js: -------------------------------------------------------------------------------- 1 | fileProtectionChecker = true; 2 | -------------------------------------------------------------------------------- /php-framework-nette/assets/denied/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /php-framework-nette/assets/failed.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/contributte/vercel-examples/3a45994af19370e0958554d3c79ef7c755f263aa/php-framework-nette/assets/failed.gif -------------------------------------------------------------------------------- /php-framework-nette/assets/info.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/contributte/vercel-examples/3a45994af19370e0958554d3c79ef7c755f263aa/php-framework-nette/assets/info.gif -------------------------------------------------------------------------------- /php-framework-nette/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/contributte/vercel-examples/3a45994af19370e0958554d3c79ef7c755f263aa/php-framework-nette/assets/logo.png -------------------------------------------------------------------------------- /php-framework-nette/assets/nginx/checker.php: -------------------------------------------------------------------------------- 1 | 4 | nginxChecker = ; 5 | -------------------------------------------------------------------------------- /php-framework-nette/assets/passed.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/contributte/vercel-examples/3a45994af19370e0958554d3c79ef7c755f263aa/php-framework-nette/assets/passed.gif -------------------------------------------------------------------------------- /php-framework-nette/assets/rewrite/.htaccess: -------------------------------------------------------------------------------- 1 | RewriteEngine On 2 | RewriteRule .* checker.js [L] 3 | -------------------------------------------------------------------------------- /php-framework-nette/assets/rewrite/checker.js: -------------------------------------------------------------------------------- 1 | modRewriteChecker = true; 2 | -------------------------------------------------------------------------------- /php-framework-nette/assets/rewrite/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /php-framework-nette/assets/warning.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/contributte/vercel-examples/3a45994af19370e0958554d3c79ef7c755f263aa/php-framework-nette/assets/warning.gif -------------------------------------------------------------------------------- /php-framework-nette/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "php": "^7.3", 4 | "tracy/tracy": "^2.6.0" 5 | } 6 | } -------------------------------------------------------------------------------- /php-framework-nette/dump.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Juicy(fx) PHP Now Builders 8 | 9 | 10 |

Juicy(fx) PHP Now Builders

11 | 12 | 18 | 19 |
20 | 21 | Copyright © 22 | 23 | 24 | -------------------------------------------------------------------------------- /php-framework-nette/now.json: -------------------------------------------------------------------------------- 1 | { 2 | "builds": [ 3 | { "src": "*.php", "use": "now-php@canary" } 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /php-framework-nette/phpinfo.php: -------------------------------------------------------------------------------- 1 | get( 8 | "/", 9 | function () { 10 | echo "

Welcome!

"; 11 | } 12 | ); 13 | 14 | $app->get( 15 | "/say/hello/{name}", 16 | function ($name) use ($app) { 17 | echo "

Hello! $name

"; 18 | echo "Your IP Address is ", $app->request->getClientAddress(); 19 | } 20 | ); 21 | 22 | $app->post( 23 | "/store/something", 24 | function () use ($app) { 25 | $name = $app->request->getPost("name"); 26 | echo "

Hello! $name

"; 27 | } 28 | ); 29 | 30 | $app->notFound( 31 | function () use ($app) { 32 | $app->response->setStatusCode(404, "Not Found"); 33 | $app->response->sendHeaders(); 34 | echo "This is crazy, but this page was not found!"; 35 | } 36 | ); 37 | 38 | $app->handle(); 39 | -------------------------------------------------------------------------------- /php-framework-phalcon/now.json: -------------------------------------------------------------------------------- 1 | { 2 | "builds": [ 3 | { "src": "*.php", "use": "now-php@canary" } 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /php-framework-slim/.gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | -------------------------------------------------------------------------------- /php-framework-slim/.nowignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | -------------------------------------------------------------------------------- /php-framework-slim/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "php": "^7.3", 4 | "slim/slim": "^3.1", 5 | "slim/php-view": "^2.0", 6 | "monolog/monolog": "^1.17", 7 | "robmorgan/phinx": "^0.5.1" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /php-framework-slim/index.php: -------------------------------------------------------------------------------- 1 | get('/hello/{name}', function (Request $request, Response $response, array $args) { 12 | $name = $args['name']; 13 | $response->getBody()->write("Hello, $name"); 14 | return $response; 15 | }); 16 | $app->get('/hello/', function (Request $request, Response $response, array $args) { 17 | $response->getBody()->write("Hello World!"); 18 | return $response; 19 | }); 20 | $app->get('/', function (Request $request, Response $response, array $args) { 21 | $response->getBody()->write("Index!"); 22 | return $response; 23 | }); 24 | $app->run(); 25 | -------------------------------------------------------------------------------- /php-framework-slim/now.json: -------------------------------------------------------------------------------- 1 | { 2 | "builds": [ 3 | { "src": "*.php", "use": "now-php@canary" } 4 | ], 5 | "routes": [ 6 | { "src": "/(.*)", "dest": "/index.php" } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /php-framework-symfony-microservice/.env: -------------------------------------------------------------------------------- 1 | # In all environments, the following files are loaded if they exist, 2 | # the later taking precedence over the former: 3 | # 4 | # * .env contains default values for the environment variables needed by the app 5 | # * .env.local uncommitted file with local overrides 6 | # * .env.$APP_ENV committed environment-specific defaults 7 | # * .env.$APP_ENV.local uncommitted environment-specific overrides 8 | # 9 | # Real environment variables win over .env files. 10 | # 11 | # DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES. 12 | # 13 | # Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2). 14 | # https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration 15 | 16 | ###> symfony/framework-bundle ### 17 | APP_ENV=dev 18 | APP_SECRET=6f71aad56e70b4481f8b1c3d2c2b6bec 19 | #TRUSTED_PROXIES=127.0.0.1,127.0.0.2 20 | #TRUSTED_HOSTS='^localhost|example\.com$' 21 | ###< symfony/framework-bundle ### 22 | -------------------------------------------------------------------------------- /php-framework-symfony-microservice/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | ###> symfony/framework-bundle ### 3 | /.env.local 4 | /.env.local.php 5 | /.env.*.local 6 | /public/bundles/ 7 | /var/ 8 | /vendor/ 9 | ###< symfony/framework-bundle ### 10 | -------------------------------------------------------------------------------- /php-framework-symfony-microservice/.nowignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | /.env 3 | -------------------------------------------------------------------------------- /php-framework-symfony-microservice/bin/console: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | getParameterOption(['--env', '-e'], null, true)) { 23 | putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env); 24 | } 25 | 26 | if ($input->hasParameterOption('--no-debug', true)) { 27 | putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0'); 28 | } 29 | 30 | require dirname(__DIR__).'/config/bootstrap.php'; 31 | 32 | if ($_SERVER['APP_DEBUG']) { 33 | umask(0000); 34 | 35 | if (class_exists(Debug::class)) { 36 | Debug::enable(); 37 | } 38 | } 39 | 40 | $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); 41 | $application = new Application($kernel); 42 | $application->run($input); 43 | -------------------------------------------------------------------------------- /php-framework-symfony-microservice/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "project", 3 | "license": "proprietary", 4 | "require": { 5 | "php": "^7.1.3", 6 | "ext-ctype": "*", 7 | "ext-iconv": "*", 8 | "symfony/console": "4.3.*", 9 | "symfony/dotenv": "4.3.*", 10 | "symfony/flex": "^1.3.1", 11 | "symfony/framework-bundle": "4.3.*", 12 | "symfony/yaml": "4.3.*" 13 | }, 14 | "require-dev": { 15 | }, 16 | "config": { 17 | "preferred-install": { 18 | "*": "dist" 19 | }, 20 | "sort-packages": true 21 | }, 22 | "autoload": { 23 | "psr-4": { 24 | "App\\": "src/" 25 | } 26 | }, 27 | "autoload-dev": { 28 | "psr-4": { 29 | "App\\Tests\\": "tests/" 30 | } 31 | }, 32 | "replace": { 33 | "paragonie/random_compat": "2.*", 34 | "symfony/polyfill-ctype": "*", 35 | "symfony/polyfill-iconv": "*", 36 | "symfony/polyfill-php71": "*", 37 | "symfony/polyfill-php70": "*", 38 | "symfony/polyfill-php56": "*" 39 | }, 40 | "scripts": { 41 | "auto-scripts": { 42 | "cache:clear": "symfony-cmd", 43 | "assets:install %PUBLIC_DIR%": "symfony-cmd" 44 | }, 45 | "post-install-cmd": [ 46 | "@auto-scripts" 47 | ], 48 | "post-update-cmd": [ 49 | "@auto-scripts" 50 | ] 51 | }, 52 | "conflict": { 53 | "symfony/symfony": "*" 54 | }, 55 | "extra": { 56 | "symfony": { 57 | "allow-contrib": false, 58 | "require": "4.3.*" 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /php-framework-symfony-microservice/config/bootstrap.php: -------------------------------------------------------------------------------- 1 | =1.2) 9 | if (is_array($env = @include dirname(__DIR__).'/.env.local.php')) { 10 | foreach ($env as $k => $v) { 11 | $_ENV[$k] = $_ENV[$k] ?? (isset($_SERVER[$k]) && 0 !== strpos($k, 'HTTP_') ? $_SERVER[$k] : $v); 12 | } 13 | } elseif (!class_exists(Dotenv::class)) { 14 | throw new RuntimeException('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application.'); 15 | } else { 16 | if (isset($_ENV['APP_ENV']) === false) { 17 | // if env variables are not set, load all from the .env files 18 | (new Dotenv(false))->loadEnv(dirname(__DIR__).'/.env'); 19 | } 20 | } 21 | 22 | $_SERVER += $_ENV; 23 | $_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? null) ?: 'dev'; 24 | $_SERVER['APP_DEBUG'] = $_SERVER['APP_DEBUG'] ?? $_ENV['APP_DEBUG'] ?? 'prod' !== $_SERVER['APP_ENV']; 25 | $_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = (int) $_SERVER['APP_DEBUG'] || filter_var($_SERVER['APP_DEBUG'], FILTER_VALIDATE_BOOLEAN) ? '1' : '0'; 26 | -------------------------------------------------------------------------------- /php-framework-symfony-microservice/config/bundles.php: -------------------------------------------------------------------------------- 1 | ['all' => true], 5 | ]; 6 | -------------------------------------------------------------------------------- /php-framework-symfony-microservice/config/packages/cache.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | cache: 3 | # Put the unique name of your app here: the prefix seed 4 | # is used to compute stable namespaces for cache keys. 5 | #prefix_seed: your_vendor_name/app_name 6 | 7 | # The app cache caches to the filesystem by default. 8 | # Other options include: 9 | 10 | # Redis 11 | #app: cache.adapter.redis 12 | #default_redis_provider: redis://localhost 13 | 14 | # APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues) 15 | #app: cache.adapter.apcu 16 | 17 | # Namespaced pools use the above "app" backend by default 18 | #pools: 19 | #my.dedicated.cache: null 20 | -------------------------------------------------------------------------------- /php-framework-symfony-microservice/config/packages/dev/routing.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | router: 3 | strict_requirements: true 4 | -------------------------------------------------------------------------------- /php-framework-symfony-microservice/config/packages/framework.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | secret: '%env(APP_SECRET)%' 3 | #csrf_protection: true 4 | #http_method_override: true 5 | 6 | # Enables session support. Note that the session will ONLY be started if you read or write from it. 7 | # Remove or comment this section to explicitly disable session support. 8 | session: 9 | handler_id: null 10 | cookie_secure: auto 11 | cookie_samesite: lax 12 | 13 | #esi: true 14 | #fragments: true 15 | php_errors: 16 | log: true 17 | -------------------------------------------------------------------------------- /php-framework-symfony-microservice/config/packages/routing.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | router: 3 | strict_requirements: null 4 | utf8: true 5 | -------------------------------------------------------------------------------- /php-framework-symfony-microservice/config/packages/test/framework.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | test: true 3 | session: 4 | storage_id: session.storage.mock_file 5 | -------------------------------------------------------------------------------- /php-framework-symfony-microservice/config/packages/test/routing.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | router: 3 | strict_requirements: true 4 | -------------------------------------------------------------------------------- /php-framework-symfony-microservice/config/routes.yaml: -------------------------------------------------------------------------------- 1 | index: 2 | path: / 3 | controller: App\Controller\DefaultController::index 4 | -------------------------------------------------------------------------------- /php-framework-symfony-microservice/config/services.yaml: -------------------------------------------------------------------------------- 1 | # This file is the entry point to configure your own services. 2 | # Files in the packages/ subdirectory configure your dependencies. 3 | 4 | # Put parameters here that don't need to change on each machine where the app is deployed 5 | # https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration 6 | parameters: 7 | 8 | services: 9 | # default configuration for services in *this* file 10 | _defaults: 11 | autowire: true # Automatically injects dependencies in your services. 12 | autoconfigure: true # Automatically registers your services as commands, event subscribers, etc. 13 | 14 | # makes classes in src/ available to be used as services 15 | # this creates a service per class whose id is the fully-qualified class name 16 | App\: 17 | resource: '../src/*' 18 | exclude: '../src/{DependencyInjection,Entity,Migrations,Tests,Kernel.php}' 19 | 20 | # controllers are imported separately to make sure services can be injected 21 | # as action arguments even if you don't extend any base controller class 22 | App\Controller\: 23 | resource: '../src/Controller' 24 | tags: ['controller.service_arguments'] 25 | 26 | # add more service definitions when explicit configuration is needed 27 | # please note that last definitions always *replace* previous ones 28 | -------------------------------------------------------------------------------- /php-framework-symfony-microservice/now.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "APP_ENV": "prod", 4 | "APP_SECRET": "6f71aad5435fe6e70b4481ffw8b1c3d2c2b6bec" 5 | }, 6 | "builds": [ 7 | { "src": "public/index.php", "use": "now-php"} 8 | ], 9 | "routes": [ 10 | { "src": "/(.*)", "dest": "public/index.php" } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /php-framework-symfony-microservice/public/index.php: -------------------------------------------------------------------------------- 1 | handle($request); 26 | $response->send(); 27 | $kernel->terminate($request, $response); 28 | -------------------------------------------------------------------------------- /php-framework-symfony-microservice/src/Controller/DefaultController.php: -------------------------------------------------------------------------------- 1 | 'Example of microservice skeleton of Symfony application', 14 | 'type' => 'Api', 15 | ]); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /php-laminas/.gitattributes: -------------------------------------------------------------------------------- 1 | /.github/ export-ignore 2 | /bin/remove-package-artifacts.php export-ignore 3 | /CHANGELOG.md 4 | -------------------------------------------------------------------------------- /php-laminas/.gitignore: -------------------------------------------------------------------------------- 1 | .vagrant/ 2 | vendor/ 3 | config/development.config.php 4 | data/cache/* 5 | !data/cache/.gitkeep 6 | phpunit.xml 7 | .phpunit.result.cache 8 | 9 | .vercel 10 | -------------------------------------------------------------------------------- /php-laminas/.vercelignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | /.idea 3 | /data 4 | -------------------------------------------------------------------------------- /php-laminas/api/index.php: -------------------------------------------------------------------------------- 1 | 10 | * $ composer development-enable 11 | * 12 | * 13 | * from the project root to copy this file to development.local.php and enable 14 | * the settings it contains. 15 | * 16 | * You may also create files matching the glob pattern `{,*.}{global,local}-development.php`. 17 | */ 18 | 19 | return [ 20 | 'view_manager' => [ 21 | 'display_exceptions' => true, 22 | ], 23 | ]; 24 | -------------------------------------------------------------------------------- /php-laminas/config/autoload/global.php: -------------------------------------------------------------------------------- 1 | [ 12 | ], 13 | // Configuration overrides during development mode 14 | 'module_listener_options' => [ 15 | 'config_glob_paths' => [realpath(__DIR__) . '/autoload/{,*.}{global,local}-development.php'], 16 | 'config_cache_enabled' => false, 17 | 'module_map_cache_enabled' => false, 18 | ], 19 | ]; 20 | -------------------------------------------------------------------------------- /php-laminas/config/modules.config.php: -------------------------------------------------------------------------------- 1 | run(); 43 | -------------------------------------------------------------------------------- /php-laminas/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "builds": [ 4 | { 5 | "src": "/api/index.php", 6 | "use": "vercel-php@0.3.1" 7 | }, 8 | { 9 | "src": "/public/**", 10 | "use": "@vercel/static" 11 | } 12 | ], 13 | "routes": [ 14 | { 15 | "src": "/(css|js|img)/(.*)", 16 | "dest": "public/$1/$2" 17 | }, 18 | { 19 | "src": "/(.*)", 20 | "dest": "/api/index.php" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /php-laravel/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | indent_style = space 8 | indent_size = 4 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.{yml,yaml}] 15 | indent_size = 2 16 | -------------------------------------------------------------------------------- /php-laravel/.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_URL=http://localhost 6 | 7 | LOG_CHANNEL=stack 8 | 9 | DB_CONNECTION=mysql 10 | DB_HOST=127.0.0.1 11 | DB_PORT=3306 12 | DB_DATABASE=laravel 13 | DB_USERNAME=root 14 | DB_PASSWORD= 15 | 16 | BROADCAST_DRIVER=log 17 | CACHE_DRIVER=file 18 | QUEUE_CONNECTION=sync 19 | SESSION_DRIVER=file 20 | SESSION_LIFETIME=120 21 | 22 | REDIS_HOST=127.0.0.1 23 | REDIS_PASSWORD=null 24 | REDIS_PORT=6379 25 | 26 | MAIL_MAILER=smtp 27 | MAIL_HOST=smtp.mailtrap.io 28 | MAIL_PORT=2525 29 | MAIL_USERNAME=null 30 | MAIL_PASSWORD=null 31 | MAIL_ENCRYPTION=null 32 | MAIL_FROM_ADDRESS=null 33 | MAIL_FROM_NAME="${APP_NAME}" 34 | 35 | AWS_ACCESS_KEY_ID= 36 | AWS_SECRET_ACCESS_KEY= 37 | AWS_DEFAULT_REGION=us-east-1 38 | AWS_BUCKET= 39 | 40 | PUSHER_APP_ID= 41 | PUSHER_APP_KEY= 42 | PUSHER_APP_SECRET= 43 | PUSHER_APP_CLUSTER=mt1 44 | 45 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 46 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 47 | 48 | NODE_PATH=node 49 | -------------------------------------------------------------------------------- /php-laravel/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | *.js linguist-vendored 5 | CHANGELOG.md export-ignore 6 | -------------------------------------------------------------------------------- /php-laravel/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /public/hot 3 | /public/storage 4 | /storage/*.key 5 | /vendor 6 | .env 7 | .env.backup 8 | .phpunit.result.cache 9 | Homestead.json 10 | Homestead.yaml 11 | npm-debug.log 12 | yarn-error.log 13 | 14 | .vercel -------------------------------------------------------------------------------- /php-laravel/.styleci.yml: -------------------------------------------------------------------------------- 1 | php: 2 | preset: laravel 3 | disabled: 4 | - unused_use 5 | finder: 6 | not-name: 7 | - index.php 8 | - server.php 9 | js: 10 | finder: 11 | not-name: 12 | - webpack.mix.js 13 | css: true 14 | -------------------------------------------------------------------------------- /php-laravel/.vercelignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | /.idea 3 | Homestead.json 4 | Homestead.yaml 5 | -------------------------------------------------------------------------------- /php-laravel/api/index.php: -------------------------------------------------------------------------------- 1 | command('inspire')->hourly(); 28 | } 29 | 30 | /** 31 | * Register the commands for the application. 32 | * 33 | * @return void 34 | */ 35 | protected function commands() 36 | { 37 | $this->load(__DIR__.'/Commands'); 38 | 39 | require base_path('routes/console.php'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /php-laravel/app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 18 | return route('login'); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /php-laravel/app/Http/Middleware/CheckForMaintenanceMode.php: -------------------------------------------------------------------------------- 1 | check()) { 22 | return redirect(RouteServiceProvider::HOME); 23 | } 24 | 25 | return $next($request); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /php-laravel/app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 17 | ]; 18 | 19 | /** 20 | * Register any authentication / authorization services. 21 | * 22 | * @return void 23 | */ 24 | public function boot() 25 | { 26 | $this->registerPolicies(); 27 | 28 | // 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /php-laravel/app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 19 | SendEmailVerificationNotification::class, 20 | ], 21 | ]; 22 | 23 | /** 24 | * Register any events for your application. 25 | * 26 | * @return void 27 | */ 28 | public function boot() 29 | { 30 | parent::boot(); 31 | 32 | // 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /php-laravel/app/User.php: -------------------------------------------------------------------------------- 1 | 'datetime', 38 | ]; 39 | } 40 | -------------------------------------------------------------------------------- /php-laravel/bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /php-laravel/config/cors.php: -------------------------------------------------------------------------------- 1 | ['api/*'], 19 | 20 | 'allowed_methods' => ['*'], 21 | 22 | 'allowed_origins' => ['*'], 23 | 24 | 'allowed_origins_patterns' => [], 25 | 26 | 'allowed_headers' => ['*'], 27 | 28 | 'exposed_headers' => [], 29 | 30 | 'max_age' => 0, 31 | 32 | 'supports_credentials' => false, 33 | 34 | ]; 35 | -------------------------------------------------------------------------------- /php-laravel/config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), 21 | ], 22 | 23 | 'postmark' => [ 24 | 'token' => env('POSTMARK_TOKEN'), 25 | ], 26 | 27 | 'ses' => [ 28 | 'key' => env('AWS_ACCESS_KEY_ID'), 29 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 30 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 31 | ], 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /php-laravel/config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | resource_path('views'), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => env( 32 | 'VIEW_COMPILED_PATH', 33 | realpath(storage_path('framework/views')) 34 | ), 35 | 36 | ]; 37 | -------------------------------------------------------------------------------- /php-laravel/database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | *.sqlite-journal 3 | -------------------------------------------------------------------------------- /php-laravel/database/factories/ArticleFactory.php: -------------------------------------------------------------------------------- 1 | faker->seed(1234); 15 | 16 | $factory->define(Article::class, function (Faker $faker) { 17 | $title = $faker->sentence(3); 18 | $content = $faker->realText($faker->numberBetween(500,4000)); 19 | return [ 20 | 'title' => $title, 21 | 'slug' => Str::slug($title), 22 | 'excerpt' => Str::limit($content, 250), 23 | 'content' => $content, 24 | 'created_at' => $faker->dateTimeBetween('-2 years', 'now') 25 | ]; 26 | }); 27 | -------------------------------------------------------------------------------- /php-laravel/database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | define(User::class, function (Faker $faker) { 21 | return [ 22 | 'name' => $faker->name, 23 | 'email' => $faker->unique()->safeEmail, 24 | 'email_verified_at' => now(), 25 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 26 | 'remember_token' => Str::random(10), 27 | ]; 28 | }); 29 | -------------------------------------------------------------------------------- /php-laravel/database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name'); 19 | $table->string('email')->unique(); 20 | $table->timestamp('email_verified_at')->nullable(); 21 | $table->string('password'); 22 | $table->rememberToken(); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('users'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /php-laravel/database/migrations/2019_08_19_000000_create_failed_jobs_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->text('connection'); 19 | $table->text('queue'); 20 | $table->longText('payload'); 21 | $table->longText('exception'); 22 | $table->timestamp('failed_at')->useCurrent(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::dropIfExists('failed_jobs'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /php-laravel/database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(UserSeeder::class); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /php-laravel/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "npm run development", 5 | "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 6 | "watch": "npm run development -- --watch", 7 | "watch-poll": "npm run watch -- --watch-poll", 8 | "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --host 0.0.0.0 --config=node_modules/laravel-mix/setup/webpack.config.js", 9 | "prod": "npm run production", 10 | "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" 11 | }, 12 | "devDependencies": { 13 | "axios": "^0.21", 14 | "cross-env": "^7.0", 15 | "laravel-mix": "^6.0.49", 16 | "lodash": "^4.17.21", 17 | "resolve-url-loader": "^3.1.2", 18 | "sass": "^1.26.9", 19 | "sass-loader": "^8.0.0", 20 | "vue-template-compiler": "^2.6.11" 21 | }, 22 | "dependencies": { 23 | "@j0nz/nifty-layouts": "^1.0.0", 24 | "@phased/phase": "^0.4.0", 25 | "dayjs": "^1.8.28", 26 | "tailwindcss": "^1.4.6", 27 | "vue": "^2.6.11", 28 | "vue-router": "^3.3.4", 29 | "vue-server-renderer": "^2.6.11", 30 | "vuex": "^3.4.0" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /php-laravel/phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | ./tests/Unit 10 | 11 | 12 | ./tests/Feature 13 | 14 | 15 | 16 | 17 | ./app 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /php-laravel/public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Send Requests To Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /php-laravel/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/contributte/vercel-examples/3a45994af19370e0958554d3c79ef7c755f263aa/php-laravel/public/favicon.ico -------------------------------------------------------------------------------- /php-laravel/public/js/app-client.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | * vue-router v3.3.4 3 | * (c) 2020 Evan You 4 | * @license MIT 5 | */ 6 | 7 | /*! 8 | * Vue.js v2.6.11 9 | * (c) 2014-2019 Evan You 10 | * Released under the MIT License. 11 | */ 12 | 13 | /*! 14 | * vuex v3.4.0 15 | * (c) 2020 Evan You 16 | * @license MIT 17 | */ 18 | -------------------------------------------------------------------------------- /php-laravel/public/js/app-server.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | * vue-router v3.3.4 3 | * (c) 2020 Evan You 4 | * @license MIT 5 | */ 6 | 7 | /*! 8 | * Vue.js v2.6.11 9 | * (c) 2014-2019 Evan You 10 | * Released under the MIT License. 11 | */ 12 | 13 | /*! 14 | * vuex v3.4.0 15 | * (c) 2020 Evan You 16 | * @license MIT 17 | */ 18 | -------------------------------------------------------------------------------- /php-laravel/public/mix-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "/js/app-client.js": "/js/app-client.js", 3 | "/js/app-server.js": "/js/app-server.js", 4 | "/css/app.css": "/css/app.css" 5 | } 6 | -------------------------------------------------------------------------------- /php-laravel/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /php-laravel/resources/js/app.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Here we will load any bootstrapping code 3 | * required by the rest of the app 4 | */ 5 | import './bootstrap' 6 | 7 | /** 8 | * Here we will import the base parts of the app 9 | * required for everything to operate properly 10 | */ 11 | import Vue from "vue"; 12 | 13 | /** 14 | * This is our phase-enhanced vuex store. 15 | */ 16 | import { store } from "./store"; 17 | 18 | /** 19 | * Here is our Vue Router. This is a standard vue router, 20 | * with a phase provided 'routes' configuration 21 | */ 22 | import { router } from "./router"; 23 | 24 | /** 25 | * Here is our NiftyLayouts config. 26 | */ 27 | import { layout } from './layouts' 28 | 29 | /** 30 | * Instead of mounting the app directly, we will export it now. 31 | * This allows phase to control enabling/disabling server side 32 | * rendering 33 | */ 34 | export default new Vue({ 35 | store, 36 | router, 37 | layout, 38 | functional: true, 39 | render: h => h('NiftyLayout', { 40 | attrs: { 41 | id: 'app', 42 | layoutTransitionName: "layout-transition", 43 | layoutTransitionMode:"out-in", 44 | routeTransitionName:"route-transition", 45 | routeTransitionMode:"out-in" 46 | } 47 | }), 48 | }); 49 | -------------------------------------------------------------------------------- /php-laravel/resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios' 2 | 3 | /** 4 | * When using the Server Side Rendering option. 'window' is unavailable 5 | * during the SSR, so any 'window' actions must first be checked to see 6 | * if it is actually undefined 7 | */ 8 | if (typeof window !== 'undefined') { 9 | /** 10 | * We'll load the axios HTTP library which allows us to easily issue requests 11 | * to our Laravel back-end. This library automatically handles sending the 12 | * CSRF token as a header based on the value of the "XSRF" token cookie. 13 | */ 14 | window.axios = axios; 15 | 16 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 17 | } 18 | -------------------------------------------------------------------------------- /php-laravel/resources/js/layouts/ArticleLayout.vue: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /php-laravel/resources/js/layouts/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import NiftyLayouts, { layoutRequire } from '@j0nz/nifty-layouts' 3 | Vue.use(NiftyLayouts) 4 | 5 | export const layout = new NiftyLayouts({ 6 | currentLayout() { 7 | return { 8 | "BlogController@HomePage": "MainLayout", 9 | "BlogController@SingleArticle": "ArticleLayout" 10 | }[this.$route.name] ?? 'MainLayout' // optional fallback for unspecified routes 11 | }, 12 | 13 | layouts: layoutRequire(require.context('./', true, /\.vue$/)), 14 | }) 15 | -------------------------------------------------------------------------------- /php-laravel/resources/js/pages/BlogController/AboutPage.vue: -------------------------------------------------------------------------------- 1 | 12 | -------------------------------------------------------------------------------- /php-laravel/resources/js/pages/BlogController/ContactPage.vue: -------------------------------------------------------------------------------- 1 | 12 | -------------------------------------------------------------------------------- /php-laravel/resources/js/pages/BlogController/HomePage.vue: -------------------------------------------------------------------------------- 1 | 27 | 28 | 37 | -------------------------------------------------------------------------------- /php-laravel/resources/js/pages/BlogController/SingleArticle.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 27 | -------------------------------------------------------------------------------- /php-laravel/resources/js/router.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | // Vue Router 4 | import VueRouter from 'vue-router' 5 | Vue.use(VueRouter) 6 | 7 | // Phase Routes 8 | import PhaseRoutes from '@phased/phase/routes' 9 | 10 | // Export our configured router 11 | export const router = new VueRouter({ 12 | mode: 'history', 13 | routes: PhaseRoutes, 14 | scrollBehavior(to, from, savedPosition) { 15 | return savedPosition ?? { x: 0, y: 0 } 16 | } 17 | }); 18 | -------------------------------------------------------------------------------- /php-laravel/resources/js/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import Vuex, { Store } from 'vuex' 3 | import { hydrate } from '@phased/state' 4 | Vue.use(Vuex) 5 | 6 | import articles from './modules/articles'; 7 | 8 | /** 9 | * Here we will 'hydrate' the vuex store. This does a few things 10 | * to help everything get ready. First it loads all data provided 11 | * by the controller on page load. Second, it registers the vuex 12 | * plugins that will handle retrieving the data from the controller 13 | * and updating the vuex state on page changes. 14 | */ 15 | export const store = new Store(hydrate({ 16 | state: { 17 | bio: null, 18 | contact: null, 19 | author: 'John Doe' 20 | }, 21 | modules: { 22 | articles 23 | } 24 | })) 25 | -------------------------------------------------------------------------------- /php-laravel/resources/js/store/modules/articles.js: -------------------------------------------------------------------------------- 1 | const freshState = () => ({ 2 | recents: null, 3 | active: null 4 | }); 5 | 6 | const getters = { 7 | // 8 | }; 9 | 10 | const mutations = { 11 | // 12 | }; 13 | 14 | const actions = { 15 | // 16 | }; 17 | 18 | export default { 19 | namespaced: true, 20 | state: freshState(), 21 | getters, 22 | mutations, 23 | actions 24 | }; 25 | -------------------------------------------------------------------------------- /php-laravel/resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /php-laravel/resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /php-laravel/resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Your password has been reset!', 17 | 'sent' => 'We have emailed your password reset link!', 18 | 'throttled' => 'Please wait before retrying.', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that email address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /php-laravel/resources/sass/app.scss: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | body { 6 | @apply min-h-screen w-full overflow-x-hidden; 7 | } 8 | 9 | @screen dark-mode { 10 | body { 11 | @apply bg-gray-900 text-gray-300; 12 | } 13 | } 14 | 15 | /* Layout Transitions */ 16 | .layout-transition-leave-active, 17 | .layout-transition-enter-active { 18 | transition: 0.3s; 19 | } 20 | .layout-transition-enter, 21 | .layout-transition-leave-to { 22 | filter: blur(25px); 23 | opacity: 0; 24 | } 25 | 26 | /* Route Transitions */ 27 | .route-transition-enter-active, 28 | .route-transition-leave-active { 29 | transition: 0.15s; 30 | } 31 | .route-transition-enter, 32 | .route-transition-leave-to { 33 | opacity: 0; 34 | } 35 | -------------------------------------------------------------------------------- /php-laravel/resources/views/parts/head.blade.php: -------------------------------------------------------------------------------- 1 | {{-- Any common-to-all page tags can be put in here --}} 2 | 3 | 4 | 5 | {{ config('app.name') }} 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /php-laravel/routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 18 | return $request->user(); 19 | }); 20 | -------------------------------------------------------------------------------- /php-laravel/routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 18 | }); 19 | -------------------------------------------------------------------------------- /php-laravel/routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 19 | })->describe('Display an inspiring quote'); 20 | -------------------------------------------------------------------------------- /php-laravel/routes/web.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | $uri = urldecode( 11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 12 | ); 13 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 15 | // built-in PHP web server. This provides a convenient way to test a Laravel 16 | // application without having installed a "real" web server software here. 17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /php-laravel/storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /php-laravel/storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /php-laravel/storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | config.php 2 | routes.php 3 | schedule-* 4 | compiled.php 5 | services.json 6 | events.scanned.php 7 | routes.scanned.php 8 | down 9 | -------------------------------------------------------------------------------- /php-laravel/storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /php-laravel/storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /php-laravel/storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /php-laravel/storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /php-laravel/storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /php-laravel/storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /php-laravel/tailwind.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | purge: [ 3 | './resources/js/**/*.vue' 4 | ], 5 | theme: { 6 | extend: { 7 | fontFamily: { 8 | 'sans': ['Inter', 'Helvetica', 'Arial', 'sans-serif'] 9 | }, 10 | screens: { 11 | 'dark-mode': { raw: '(prefers-color-scheme: dark)' } 12 | } 13 | }, 14 | }, 15 | variants: {}, 16 | plugins: [], 17 | } 18 | -------------------------------------------------------------------------------- /php-laravel/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "builds": [ 4 | { "src": "/api/index.php", "use": "vercel-php@0.3.1" }, 5 | { "src": "/public/**", "use": "@vercel/static" } 6 | ], 7 | "routes": [ 8 | { 9 | "src": "/(css|js)/(.*)", 10 | "dest": "public/$1/$2" 11 | }, 12 | { 13 | "src": "/(.*)", 14 | "dest": "/api/index.php" 15 | } 16 | ], 17 | "env": { 18 | "APP_NAME": "Vercel Laravel", 19 | "APP_ENV": "production", 20 | "APP_DEBUG": "false", 21 | "APP_URL": "https://php-laravel.vercel.app", 22 | "VERCEL_DEMO_MODE": "true", 23 | "APP_CONFIG_CACHE": "/tmp/config.php", 24 | "APP_EVENTS_CACHE": "/tmp/events.php", 25 | "APP_PACKAGES_CACHE": "/tmp/packages.php", 26 | "APP_ROUTES_CACHE": "/tmp/routes.php", 27 | "APP_SERVICES_CACHE": "/tmp/services.php", 28 | "CACHE_DRIVER": "array", 29 | "LOG_CHANNEL": "stderr", 30 | "SESSION_DRIVER": "array", 31 | "VIEW_COMPILED_PATH": "/tmp/views", 32 | "SSR_TEMP_PATH": "/tmp/ssr", 33 | "NODE_PATH": "node" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /php-laravel/webpack.mix.js: -------------------------------------------------------------------------------- 1 | const mix = require("laravel-mix"); 2 | const tailwindcss = require("tailwindcss"); 3 | const Mix = require("laravel-mix/src/Mix"); 4 | require("@phased/phase"); 5 | 6 | /* 7 | |-------------------------------------------------------------------------- 8 | | Mix Asset Management 9 | |-------------------------------------------------------------------------- 10 | | 11 | | Mix provides a clean, fluent API for defining some Webpack build steps 12 | | for your Laravel application. By default, we are compiling the Sass 13 | | file for the application as well as bundling up all the JS files. 14 | | 15 | */ 16 | 17 | mix 18 | .options({ 19 | processCssUrls: false, 20 | postCss: [tailwindcss("./tailwind.config.js")], 21 | }) 22 | .webpackConfig(() => ({ 23 | resolve: { 24 | alias: { "@": path.resolve(__dirname, "resources", "js") }, 25 | }, 26 | })) 27 | .phase(); 28 | 29 | if (!mix.inProduction()) { 30 | mix.sourceMaps(); 31 | } 32 | -------------------------------------------------------------------------------- /php-lumen/.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=Lumen 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_URL=http://localhost 6 | APP_TIMEZONE=UTC 7 | 8 | LOG_CHANNEL=stack 9 | LOG_SLACK_WEBHOOK_URL= 10 | 11 | DB_CONNECTION=mysql 12 | DB_HOST=127.0.0.1 13 | DB_PORT=3306 14 | DB_DATABASE=homestead 15 | DB_USERNAME=homestead 16 | DB_PASSWORD=secret 17 | 18 | CACHE_DRIVER=file 19 | QUEUE_CONNECTION=sync 20 | -------------------------------------------------------------------------------- /php-lumen/.gitignore: -------------------------------------------------------------------------------- 1 | # PHP 2 | /vendor 3 | 4 | # Vercel 5 | .vercel 6 | 7 | # ENV 8 | .env -------------------------------------------------------------------------------- /php-lumen/.styleci.yml: -------------------------------------------------------------------------------- 1 | php: 2 | preset: laravel 3 | enabled: 4 | - alpha_ordered_imports 5 | disabled: 6 | - length_ordered_imports 7 | - unused_use 8 | js: true 9 | css: true 10 | -------------------------------------------------------------------------------- /php-lumen/.vercelignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | /.idea 3 | Homestead.json 4 | Homestead.yaml 5 | -------------------------------------------------------------------------------- /php-lumen/api/index.php: -------------------------------------------------------------------------------- 1 | auth = $auth; 26 | } 27 | 28 | /** 29 | * Handle an incoming request. 30 | * 31 | * @param \Illuminate\Http\Request $request 32 | * @param \Closure $next 33 | * @param string|null $guard 34 | * @return mixed 35 | */ 36 | public function handle($request, Closure $next, $guard = null) 37 | { 38 | if ($this->auth->guard($guard)->guest()) { 39 | return response('Unauthorized.', 401); 40 | } 41 | 42 | return $next($request); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /php-lumen/app/Http/Middleware/ExampleMiddleware.php: -------------------------------------------------------------------------------- 1 | app['auth']->viaRequest('api', function ($request) { 34 | if ($request->input('api_token')) { 35 | return User::where('api_token', $request->input('api_token'))->first(); 36 | } 37 | }); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /php-lumen/app/Providers/EventServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 16 | 'App\Listeners\ExampleListener', 17 | ], 18 | ]; 19 | } 20 | -------------------------------------------------------------------------------- /php-lumen/app/User.php: -------------------------------------------------------------------------------- 1 | make( 32 | 'Illuminate\Contracts\Console\Kernel' 33 | ); 34 | 35 | exit($kernel->handle(new ArgvInput, new ConsoleOutput)); 36 | -------------------------------------------------------------------------------- /php-lumen/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "php": "^7.3|^8.0", 4 | "laravel/lumen-framework": "^8.2.7" 5 | }, 6 | "require-dev": { 7 | "fzaninotto/faker": "^1.4", 8 | "phpunit/phpunit": "^8.0", 9 | "mockery/mockery": "^1.0" 10 | }, 11 | "autoload": { 12 | "classmap": [ 13 | "database/seeds", 14 | "database/factories" 15 | ], 16 | "psr-4": { 17 | "App\\": "app/" 18 | } 19 | }, 20 | "autoload-dev": { 21 | "classmap": [ 22 | "tests/" 23 | ] 24 | }, 25 | "scripts": { 26 | "post-root-package-install": [ 27 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 28 | ] 29 | }, 30 | "config": { 31 | "preferred-install": "dist", 32 | "sort-packages": true, 33 | "optimize-autoloader": true 34 | }, 35 | "minimum-stability": "dev", 36 | "prefer-stable": true 37 | } 38 | -------------------------------------------------------------------------------- /php-lumen/database/factories/ModelFactory.php: -------------------------------------------------------------------------------- 1 | define(App\User::class, function (Faker\Generator $faker) { 15 | return [ 16 | 'name' => $faker->name, 17 | 'email' => $faker->email, 18 | ]; 19 | }); 20 | -------------------------------------------------------------------------------- /php-lumen/database/migrations/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/contributte/vercel-examples/3a45994af19370e0958554d3c79ef7c755f263aa/php-lumen/database/migrations/.gitkeep -------------------------------------------------------------------------------- /php-lumen/database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call('UsersTableSeeder'); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /php-lumen/public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Handle Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /php-lumen/public/index.php: -------------------------------------------------------------------------------- 1 | run(); 29 | -------------------------------------------------------------------------------- /php-lumen/resources/views/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/contributte/vercel-examples/3a45994af19370e0958554d3c79ef7c755f263aa/php-lumen/resources/views/.gitkeep -------------------------------------------------------------------------------- /php-lumen/routes/web.php: -------------------------------------------------------------------------------- 1 | get('/', function () use ($router) { 15 | return $router->app->version(); 16 | }); 17 | -------------------------------------------------------------------------------- /php-lumen/storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /php-lumen/storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /php-lumen/storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /php-lumen/storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /php-lumen/storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /php-lumen/tests/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/contributte/vercel-examples/3a45994af19370e0958554d3c79ef7c755f263aa/php-lumen/tests/.gitkeep -------------------------------------------------------------------------------- /php-lumen/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "functions": { 3 | "api/index.php": { 4 | "runtime": "vercel-php@0.4.0" 5 | } 6 | }, 7 | "routes": [ 8 | { "src": "/(.*)", "dest": "/api/index.php" } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /php-nette-tracy/.gitignore: -------------------------------------------------------------------------------- 1 | # PHP 2 | /vendor 3 | 4 | # Vercel 5 | .vercel 6 | -------------------------------------------------------------------------------- /php-nette-tracy/.vercelignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | -------------------------------------------------------------------------------- /php-nette-tracy/api/assets/denied/.htaccess: -------------------------------------------------------------------------------- 1 | Order Allow,Deny 2 | Deny from all 3 | -------------------------------------------------------------------------------- /php-nette-tracy/api/assets/denied/checker.js: -------------------------------------------------------------------------------- 1 | fileProtectionChecker = true; 2 | -------------------------------------------------------------------------------- /php-nette-tracy/api/assets/denied/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /php-nette-tracy/api/assets/failed.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/contributte/vercel-examples/3a45994af19370e0958554d3c79ef7c755f263aa/php-nette-tracy/api/assets/failed.gif -------------------------------------------------------------------------------- /php-nette-tracy/api/assets/info.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/contributte/vercel-examples/3a45994af19370e0958554d3c79ef7c755f263aa/php-nette-tracy/api/assets/info.gif -------------------------------------------------------------------------------- /php-nette-tracy/api/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/contributte/vercel-examples/3a45994af19370e0958554d3c79ef7c755f263aa/php-nette-tracy/api/assets/logo.png -------------------------------------------------------------------------------- /php-nette-tracy/api/assets/nginx/checker.php: -------------------------------------------------------------------------------- 1 | 4 | nginxChecker = ; 5 | -------------------------------------------------------------------------------- /php-nette-tracy/api/assets/passed.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/contributte/vercel-examples/3a45994af19370e0958554d3c79ef7c755f263aa/php-nette-tracy/api/assets/passed.gif -------------------------------------------------------------------------------- /php-nette-tracy/api/assets/rewrite/.htaccess: -------------------------------------------------------------------------------- 1 | RewriteEngine On 2 | RewriteRule .* checker.js [L] 3 | -------------------------------------------------------------------------------- /php-nette-tracy/api/assets/rewrite/checker.js: -------------------------------------------------------------------------------- 1 | modRewriteChecker = true; 2 | -------------------------------------------------------------------------------- /php-nette-tracy/api/assets/rewrite/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /php-nette-tracy/api/assets/warning.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/contributte/vercel-examples/3a45994af19370e0958554d3c79ef7c755f263aa/php-nette-tracy/api/assets/warning.gif -------------------------------------------------------------------------------- /php-nette-tracy/api/dump.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Juicy(fx) PHP Now Builders 8 | 9 | 10 |

Juicy(fx) PHP Now Builders

11 | 12 | 18 | 19 |
20 | 21 | Copyright © 22 | 23 | 24 | -------------------------------------------------------------------------------- /php-nette-tracy/api/phpinfo.php: -------------------------------------------------------------------------------- 1 | get( 8 | "/", 9 | function () { 10 | echo "

Welcome!

"; 11 | } 12 | ); 13 | 14 | $app->get( 15 | "/say/hello/{name}", 16 | function ($name) use ($app) { 17 | echo "

Hello! $name

"; 18 | echo "Your IP Address is ", $app->request->getClientAddress(); 19 | } 20 | ); 21 | 22 | $app->post( 23 | "/store/something", 24 | function () use ($app) { 25 | $name = $app->request->getPost("name"); 26 | echo "

Hello! $name

"; 27 | } 28 | ); 29 | 30 | $app->notFound( 31 | function () use ($app) { 32 | $app->response->setStatusCode(404, "Not Found"); 33 | $app->response->sendHeaders(); 34 | echo "This is crazy, but this page was not found!"; 35 | } 36 | ); 37 | 38 | $app->handle($_SERVER["REQUEST_URI"]); 39 | -------------------------------------------------------------------------------- /php-phalcon/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "functions": { 3 | "api/index.php": { 4 | "runtime": "vercel-php@0.3.1" 5 | } 6 | }, 7 | "rewrites": [ 8 | { "source": "/favicon.ico", "destination": "https://juicy.vercel.app/favicon.ico" }, 9 | { "source": "/(.*)", "destination": "/api/index.php" } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /php-satis/.gitignore: -------------------------------------------------------------------------------- 1 | # PHP 2 | /vendor 3 | 4 | # Vercel 5 | .vercel 6 | -------------------------------------------------------------------------------- /php-satis/.vercelignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | -------------------------------------------------------------------------------- /php-satis/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "composer/satis": "^1.0" 4 | }, 5 | "scripts": { 6 | "vercel": "satis build satis.json public -vvv" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /php-satis/index.php: -------------------------------------------------------------------------------- 1 | 1, 'name' => 'f3l1x'], 5 | ['id' => 2, 'name' => 'chemix'], 6 | ['id' => 3, 'name' => 'dg'], 7 | ['id' => 4, 'name' => 'milo'], 8 | ['id' => 5, 'name' => 'matej21'], 9 | ['id' => 6, 'name' => 'merxes'], 10 | ]; 11 | 12 | header('Content-Type: application/json'); 13 | 14 | echo json_encode($data); 15 | -------------------------------------------------------------------------------- /php-show/api/ext/ds.php: -------------------------------------------------------------------------------- 1 | 1, "b" => 2, "c" => 3]); 3 | $map->apply(function($key, $value) { return $value * 2; }); 4 | 5 | print_r($map); 6 | ?> -------------------------------------------------------------------------------- /php-show/api/ext/gd.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /php-show/api/ext/index.php: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /php-show/api/ext/phalcon.php: -------------------------------------------------------------------------------- 1 | get( 8 | "/", 9 | function () { 10 | echo "

Welcome!

"; 11 | } 12 | ); 13 | 14 | $app->get( 15 | "/say/hello/{name}", 16 | function ($name) use ($app) { 17 | echo "

Hello! $name

"; 18 | echo "Your IP Address is ", $app->request->getClientAddress(); 19 | } 20 | ); 21 | 22 | $app->post( 23 | "/store/something", 24 | function () use ($app) { 25 | $name = $app->request->getPost("name"); 26 | echo "

Hello! $name

"; 27 | } 28 | ); 29 | 30 | $app->notFound( 31 | function () use ($app) { 32 | $app->response->setStatusCode(404, "Not Found"); 33 | $app->response->sendHeaders(); 34 | echo "This is crazy, but this page was not found!"; 35 | } 36 | ); 37 | 38 | $app->handle(); 39 | -------------------------------------------------------------------------------- /php-show/api/file.php: -------------------------------------------------------------------------------- 1 | given'); 7 | } 8 | 9 | echo file_get_contents($file); 10 | -------------------------------------------------------------------------------- /php-show/api/hello.php: -------------------------------------------------------------------------------- 1 | php.ini 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | $group) { 15 | echo ""; 16 | echo sprintf('', $name); 17 | echo sprintf('', $group['global_value']); 18 | echo sprintf('', $group['local_value']); 19 | echo sprintf('', $group['access']); 20 | echo ""; 21 | } 22 | ?> 23 | 24 |
optionglobal_valuelocal_valueaccess
%s%s%s%s
25 | -------------------------------------------------------------------------------- /php-show/api/libs.php: -------------------------------------------------------------------------------- 1 | "; 9 | } else { 10 | $files = scandir($path); 11 | echo "Scan folder: $path
"; 12 | array_map(function($file) { 13 | echo "- $file
"; 14 | }, $files); 15 | } 16 | echo "
"; 17 | } 18 | -------------------------------------------------------------------------------- /php-show/api/test.php: -------------------------------------------------------------------------------- 1 | get('/hello/{name}', function (Request $request, Response $response, array $args) { 12 | $name = $args['name']; 13 | $response->getBody()->write("Hello, $name"); 14 | return $response; 15 | }); 16 | 17 | $app->get('/hello/', function (Request $request, Response $response, array $args) { 18 | $response->getBody()->write("Hello World!"); 19 | return $response; 20 | }); 21 | 22 | $app->get('/', function (Request $request, Response $response, array $args) { 23 | $response->getBody()->write("Index!"); 24 | return $response; 25 | }); 26 | 27 | $app->run(); 28 | -------------------------------------------------------------------------------- /php-slim/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "php": "^7.4", 4 | "slim/slim": "^4.6", 5 | "slim/psr7": "^1.2" 6 | }, 7 | "scripts": { 8 | "dev": "php -S localhost:8080 -t api api/index.php" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /php-slim/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "functions": { 3 | "api/index.php": { 4 | "runtime": "vercel-php@0.5.2" 5 | } 6 | }, 7 | "rewrites": [ 8 | { "source": "/favicon.ico", "destination": "https://juicy.vercel.app/favicon.ico" }, 9 | { "source": "/(.*)", "destination": "/api/index.php" } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /php-sqlite/.gitignore: -------------------------------------------------------------------------------- 1 | # Vercel 2 | .vercel 3 | -------------------------------------------------------------------------------- /php-sqlite/api/index.php: -------------------------------------------------------------------------------- 1 | query('CREATE TABLE IF NOT EXISTS "visits" ( 6 | "id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, 7 | "url" VARCHAR, 8 | "time" DATETIME 9 | )'); 10 | 11 | $statement = $db->prepare('INSERT INTO "visits" ("url", "time") VALUES (:url, :time)'); 12 | $statement->bindValue(':url', ($_SERVER['HTTP_X_FORWARDED_PROTO'] ?? 'https') . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); 13 | $statement->bindValue(':time', date('Y-m-d H:i:s')); 14 | $statement->execute(); 15 | 16 | $visits = $db->querySingle('SELECT COUNT(id) FROM "visits"'); 17 | 18 | echo("User visits: $visits"); 19 | 20 | $db->close(); 21 | -------------------------------------------------------------------------------- /php-sqlite/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "functions": { 3 | "api/index.php": { 4 | "runtime": "vercel-php@0.3.1" 5 | } 6 | }, 7 | "rewrites": [ 8 | { "source": "/favicon.ico", "destination": "https://juicy.vercel.app/favicon.ico" }, 9 | { "source": "/(.*)", "destination": "/api/index.php" } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /php-symfony-micro1/.env: -------------------------------------------------------------------------------- 1 | # In all environments, the following files are loaded if they exist, 2 | # the later taking precedence over the former: 3 | # 4 | # * .env contains default values for the environment variables needed by the app 5 | # * .env.local uncommitted file with local overrides 6 | # * .env.$APP_ENV committed environment-specific defaults 7 | # * .env.$APP_ENV.local uncommitted environment-specific overrides 8 | # 9 | # Real environment variables win over .env files. 10 | # 11 | # DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES. 12 | # 13 | # Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2). 14 | # https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration 15 | 16 | ###> symfony/framework-bundle ### 17 | APP_ENV=dev 18 | APP_SECRET=6f71aad56e70b4481f8b1c3d2c2b6bec 19 | #TRUSTED_PROXIES=127.0.0.1,127.0.0.2 20 | #TRUSTED_HOSTS='^localhost|example\.com$' 21 | ###< symfony/framework-bundle ### 22 | -------------------------------------------------------------------------------- /php-symfony-micro1/.gitignore: -------------------------------------------------------------------------------- 1 | # Vercel 2 | .vercel 3 | 4 | # PHP 5 | /vendor 6 | /var 7 | -------------------------------------------------------------------------------- /php-symfony-micro1/.vercelignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | /.env 3 | -------------------------------------------------------------------------------- /php-symfony-micro1/api/index.php: -------------------------------------------------------------------------------- 1 | getParameterOption(['--env', '-e'], null, true)) { 23 | putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env); 24 | } 25 | 26 | if ($input->hasParameterOption('--no-debug', true)) { 27 | putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0'); 28 | } 29 | 30 | require dirname(__DIR__).'/config/bootstrap.php'; 31 | 32 | if ($_SERVER['APP_DEBUG']) { 33 | umask(0000); 34 | 35 | if (class_exists(Debug::class)) { 36 | Debug::enable(); 37 | } 38 | } 39 | 40 | $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); 41 | $application = new Application($kernel); 42 | $application->run($input); 43 | -------------------------------------------------------------------------------- /php-symfony-micro1/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "php": "^7.1.3", 4 | "ext-ctype": "*", 5 | "ext-iconv": "*", 6 | "symfony/console": "4.3.*", 7 | "symfony/dotenv": "4.3.*", 8 | "symfony/flex": "^1.3.1", 9 | "symfony/framework-bundle": "4.3.*", 10 | "symfony/yaml": "4.3.*" 11 | }, 12 | "config": { 13 | "preferred-install": { 14 | "*": "dist" 15 | }, 16 | "sort-packages": true 17 | }, 18 | "autoload": { 19 | "psr-4": { 20 | "App\\": "src/" 21 | } 22 | }, 23 | "autoload-dev": { 24 | "psr-4": { 25 | "App\\Tests\\": "tests/" 26 | } 27 | }, 28 | "replace": { 29 | "paragonie/random_compat": "2.*", 30 | "symfony/polyfill-ctype": "*", 31 | "symfony/polyfill-iconv": "*", 32 | "symfony/polyfill-php71": "*", 33 | "symfony/polyfill-php70": "*", 34 | "symfony/polyfill-php56": "*" 35 | }, 36 | "scripts": { 37 | "auto-scripts": { 38 | "cache:clear": "symfony-cmd", 39 | "assets:install %PUBLIC_DIR%": "symfony-cmd" 40 | }, 41 | "post-install-cmd": [ 42 | "@auto-scripts" 43 | ], 44 | "post-update-cmd": [ 45 | "@auto-scripts" 46 | ] 47 | }, 48 | "conflict": { 49 | "symfony/symfony": "*" 50 | }, 51 | "extra": { 52 | "symfony": { 53 | "allow-contrib": false, 54 | "require": "4.3.*" 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /php-symfony-micro1/config/bootstrap.php: -------------------------------------------------------------------------------- 1 | =1.2) 9 | if (is_array($env = @include dirname(__DIR__).'/.env.local.php')) { 10 | foreach ($env as $k => $v) { 11 | $_ENV[$k] = $_ENV[$k] ?? (isset($_SERVER[$k]) && 0 !== strpos($k, 'HTTP_') ? $_SERVER[$k] : $v); 12 | } 13 | } elseif (!class_exists(Dotenv::class)) { 14 | throw new RuntimeException('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application.'); 15 | } else { 16 | if (isset($_ENV['APP_ENV']) === false) { 17 | // if env variables are not set, load all from the .env files 18 | (new Dotenv(false))->loadEnv(dirname(__DIR__).'/.env'); 19 | } 20 | } 21 | 22 | $_SERVER += $_ENV; 23 | $_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? null) ?: 'dev'; 24 | $_SERVER['APP_DEBUG'] = $_SERVER['APP_DEBUG'] ?? $_ENV['APP_DEBUG'] ?? 'prod' !== $_SERVER['APP_ENV']; 25 | $_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = (int) $_SERVER['APP_DEBUG'] || filter_var($_SERVER['APP_DEBUG'], FILTER_VALIDATE_BOOLEAN) ? '1' : '0'; 26 | -------------------------------------------------------------------------------- /php-symfony-micro1/config/bundles.php: -------------------------------------------------------------------------------- 1 | ['all' => true], 5 | ]; 6 | -------------------------------------------------------------------------------- /php-symfony-micro1/config/packages/cache.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | cache: 3 | # Put the unique name of your app here: the prefix seed 4 | # is used to compute stable namespaces for cache keys. 5 | #prefix_seed: your_vendor_name/app_name 6 | 7 | # The app cache caches to the filesystem by default. 8 | # Other options include: 9 | 10 | # Redis 11 | #app: cache.adapter.redis 12 | #default_redis_provider: redis://localhost 13 | 14 | # APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues) 15 | #app: cache.adapter.apcu 16 | 17 | # Namespaced pools use the above "app" backend by default 18 | #pools: 19 | #my.dedicated.cache: null 20 | -------------------------------------------------------------------------------- /php-symfony-micro1/config/packages/dev/routing.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | router: 3 | strict_requirements: true 4 | -------------------------------------------------------------------------------- /php-symfony-micro1/config/packages/framework.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | secret: '%env(APP_SECRET)%' 3 | #csrf_protection: true 4 | #http_method_override: true 5 | 6 | # Enables session support. Note that the session will ONLY be started if you read or write from it. 7 | # Remove or comment this section to explicitly disable session support. 8 | session: 9 | handler_id: null 10 | cookie_secure: auto 11 | cookie_samesite: lax 12 | 13 | #esi: true 14 | #fragments: true 15 | php_errors: 16 | log: true 17 | -------------------------------------------------------------------------------- /php-symfony-micro1/config/packages/routing.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | router: 3 | strict_requirements: null 4 | utf8: true 5 | -------------------------------------------------------------------------------- /php-symfony-micro1/config/packages/test/framework.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | test: true 3 | session: 4 | storage_id: session.storage.mock_file 5 | -------------------------------------------------------------------------------- /php-symfony-micro1/config/packages/test/routing.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | router: 3 | strict_requirements: true 4 | -------------------------------------------------------------------------------- /php-symfony-micro1/config/routes.yaml: -------------------------------------------------------------------------------- 1 | index: 2 | path: / 3 | controller: App\Controller\DefaultController::index 4 | -------------------------------------------------------------------------------- /php-symfony-micro1/config/services.yaml: -------------------------------------------------------------------------------- 1 | # This file is the entry point to configure your own services. 2 | # Files in the packages/ subdirectory configure your dependencies. 3 | 4 | # Put parameters here that don't need to change on each machine where the app is deployed 5 | # https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration 6 | parameters: 7 | 8 | services: 9 | # default configuration for services in *this* file 10 | _defaults: 11 | autowire: true # Automatically injects dependencies in your services. 12 | autoconfigure: true # Automatically registers your services as commands, event subscribers, etc. 13 | 14 | # makes classes in src/ available to be used as services 15 | # this creates a service per class whose id is the fully-qualified class name 16 | App\: 17 | resource: '../src/*' 18 | exclude: '../src/{DependencyInjection,Entity,Migrations,Tests,Kernel.php}' 19 | 20 | # controllers are imported separately to make sure services can be injected 21 | # as action arguments even if you don't extend any base controller class 22 | App\Controller\: 23 | resource: '../src/Controller' 24 | tags: ['controller.service_arguments'] 25 | 26 | # add more service definitions when explicit configuration is needed 27 | # please note that last definitions always *replace* previous ones 28 | -------------------------------------------------------------------------------- /php-symfony-micro1/public/index.php: -------------------------------------------------------------------------------- 1 | handle($request); 26 | $response->send(); 27 | $kernel->terminate($request, $response); 28 | -------------------------------------------------------------------------------- /php-symfony-micro1/src/Controller/DefaultController.php: -------------------------------------------------------------------------------- 1 | 'Example of microservice skeleton of Symfony application', 14 | 'type' => 'Api', 15 | ]); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /php-symfony-micro1/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "functions": { 3 | "api/index.php": { 4 | "runtime": "vercel-php@0.3.1" 5 | } 6 | }, 7 | "routes": [ 8 | { "src": "/(.*)", "dest": "/api/index.php" } 9 | ], 10 | "env": { 11 | "APP_ENV": "dev", 12 | "APP_SECRET": "6f71aad5435fe6e70b4481ffw8b1c3d2c2b6bec" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /php-symfony-micro2/.gitignore: -------------------------------------------------------------------------------- 1 | # Vercel 2 | .vercel 3 | 4 | # PHP 5 | /vendor 6 | /var 7 | -------------------------------------------------------------------------------- /php-symfony-micro2/.vercelignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | -------------------------------------------------------------------------------- /php-symfony-micro2/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "symfony/config": "^5.1", 4 | "symfony/http-kernel": "^5.1", 5 | "symfony/http-foundation": "^5.1", 6 | "symfony/routing": "^5.1", 7 | "symfony/dependency-injection": "^5.1", 8 | "symfony/framework-bundle": "^5.1" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /php-symfony-micro2/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "functions": { 3 | "api/index.php": { 4 | "runtime": "vercel-php@0.3.1" 5 | } 6 | }, 7 | "rewrites": [ 8 | { "source": "/favicon.ico", "destination": "https://juicy.vercel.app/favicon.ico" }, 9 | { "source": "/(.*)", "destination": "/api/index.php" } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /php/.gitignore: -------------------------------------------------------------------------------- 1 | # Vercel 2 | .vercel 3 | -------------------------------------------------------------------------------- /php/api/index.php: -------------------------------------------------------------------------------- 1 | time(), 'date' => date('d.m.Y'), 'tech' => 'Vercel']); 5 | -------------------------------------------------------------------------------- /php/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Vercel + PHP 9 | 10 | 11 | 12 | 13 |
14 |
15 | Vercel + PHP 16 | 17 | Deploy to Vercel 18 | 19 |
20 | 21 |

Use the deploy button or follow these steps.

22 | 23 |
    24 |
  1. Clone repository git clone git@github.com:vercel-community/php.git
  2. 25 |
  3. Switch to /php folder and run vercel
  4. 26 |
  5. Open generated *.vercel.app domain [demo]
  6. 27 |
  7. Discover *.vercel.app/api/ PHP functions [demo]
  8. 28 |
29 |
30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /php/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "functions": { 3 | "api/index.php": { 4 | "runtime": "vercel-php@0.5.2" 5 | } 6 | } 7 | } 8 | --------------------------------------------------------------------------------