Skip to content

mahmoudmohamedramadan/Awesome-PHP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Awesome PHP

📌 Covered Topics

Note

You can add an awesome package, but please, go on the same approach I follow.

🚀 Getting Started

Installation of the next packages requires Composer.

Aura Router

This package helps you to create routes as you're in Laravel Framework.

Install the Aura package:

composer require aura/router

In addition, implement the PSR-7:

composer require zendframework/zend-diactoros

Finally, copy & paste the code in the Aura-Router/index.php to get the /users/{id} route:

php -S localhost:8000 -t app/Aura-Router

Tip

-t argument refers to the index.php path.

DiDOM Web Scraping

This package lets you extract information from a specific page/link.

Install the DiDOM package, then copy & paste the code in the DiDOM-Web-Scraping/index.php

composer require imangazaliev/didom

CssToInlineStyles

This package allows you to merge separate HTML and CSS files into one file (This is useful when you decide to send an email).

Install the CssToInlineStyles package, then copy & paste the code in CssToInlineStyles/index.php:

composer require tijsverkoyen/css-to-inline-styles

AmPHP MySQL

We all know that PHP works synchronous execution so, if you send a query database then you should wait until the database server responds to you in a blocking manner, instead of sitting do nothing you can send the next query database or do an HTTP call to an API.

Install the AmPHP MySQL package, then copy & paste the code in the AmPHP-MySQL/index.php:

composer require amphp/mysql

Reflection PHP

Reflection API allows you to know more information about Classes, Interfaces, Functions, and Extensions (There is no installation needed to use these functions, they are part of the PHP core).

Copy & paste the code in the Reflection/index.php

KNP-Menu

This package allows you to create a list HTML tag without writing any HTML code.

Install the KNP-Menu package, then copy & paste the code in the KNP-Menu/index.php:

composer require knplabs/knp-menu

PHP-CodeSniffer

This package allows you to detect violations of a defined coding standard in the PHP, HTML, and CSS files by two files which are phpcs and phpcbf.

Install the PHP-CodeSniffer package:

composer require squizlabs/php_codesniffer

Run the next command to show the ERRORS and WARNING in your code (phpcs.png):

./vendor/bin/phpcs folderPath/filePath.php

Run the next command to automatically correct code standard violations (phpcbf.png):

./vendor/bin/phpcbf folderPath/filePath.php

Carbon

This package allows you to deal with dates and times easily.

Install the Carbon package, then copy & paste the code in the Carbon/index.php:

composer require nesbot/carbon

Money

This package allows you to deal with monetary calculations carefully.

Install the Mony package, then copy & paste the code in the Money/index.php:

composer require brick/money

Markup

This package allows you to deal with HTML in a cinch manner.

Install the Markup package, then copy & paste the code in the Markup/index.php:

composer require rusev/parsedown

Agent

This package gives you more information about the device and the browser that runs the application.

Install the Agent package, then copy & paste the code in the Agent/index.php:

composer require jenssegers/agent

Blade

This package lets you deal with the .blade.php extension as if in Laravel Framework.

Install the Blade package, then copy & paste the code in the Blade/index.php:

composer require jenssegers/blade

Assertion

This package allows you to validate the form inputs easily.

Install the Assertion package, then copy & paste the code in the Assertion/index.php:

composer require beberlei/assert

Fractal

This package provides a presentation and transformation layer for complex data output.

Install the Fractal package, then copy & paste the code in the Fractal/index.php:

composer require league/fractal

Notification

This package allows displaying desktop notifications.

Install the Notification package, then copy & paste the code in the Notification/index.php:

composer require jolicode/jolinotif

💳 Support me