A list of amazingly awesome PHP libraries, resources and shiny things.
- Composer/Packagist - A package and dependency manager.
- Composer Installers - A multi framework Composer library installer.
| from rest_framework.pagination import PageNumberPagination, _positive_int | |
| class CustomPageNumberPagination(PageNumberPagination): | |
| """ A custom DRF paginator class | |
| """ | |
| # Client can control the page using this query parameter. | |
| page_query_param = 'page' | |
| # Client can control the page size using this query parameter. |
| import logging | |
| from rest_framework import serializers | |
| class GeneralModelSerializer(serializers.ModelSerializer): | |
| """ General model serializer that will serialize a model object. It will return all the model fields. | |
| """ | |
| class Meta: | |
| model = None |
| <?php | |
| namespace MyFunnyValentine; | |
| // Detect if the currently matched route belongs to this module. | |
| // The assumption is that the controller name includes the module namespace. | |
| class Module | |
| { | |
| public function onBootstrap($e) |
A list of amazingly awesome PHP libraries, resources and shiny things.