Back to Browse

Doctrine ORM Paginator in PHP REST API with Expressive - 006

4.7K views
Jan 23, 2019
25:37

Using the Doctrine ORM Paginator in our PHP project for pagination in our database queries. And how to configure routing to handle the pagination in the GET arguments. (see shortcuts below to key points) Adam Culp of Beachcasts php videos will introduce pagination to the Doctrine results from the database through repositories. Later we will be introducing Zend Framework (Laminas Project) components, as well as components from other projects. Next video in the series: https://youtu.be/aV6ro_JXL_A It is part of the playlist: https://www.youtube.com/playlist?list=PL6_nF0awZMoMol4RPLf99WIZuoJ3l87oG Please * LIKE, COMMENT, AND SUBSCRIBE * - and share with others! Key Topics: - Adding Doctrine Paginator to a PHP Project for pagination - Create page size in the configuration - Using dependency injection to pass the page size to the Handler - Create temporary variables to help manage meta data used by pagination - Create dynamic route to handle pagination through the request URL For a nice list of equipment I use in my studio, and to support the channel if you make any purchases (doesn't cost you a thing), visit my kit at kit.co: https://kit.co/beachcasts/beachcasts-studio Errata: Let me know if you notice anything that should be errata Code used in this, and in future videos in this series is located at: https://github.com/Beachcasts/doctrine-expressive-example Associated Links: https://www.doctrine-project.org/projects/orm.html - Site for Doctrine ORM https://getexpressive.org/ - Expressive main site https://getlaminas.org/ - Laminas Project site Timeline: 00:00 Video Intro 01:44 How to make Json response pretty in PhpStorm HTTP Client 03:40 Create a local configuration file for Zend Expressive 04:15 Create pagination setting in the Zend Expressive config 05:55 Use configuration item in a Factory in Zend Expressive from the Container 07:55 Create a protected field in a class and populate it through injected values from a constructor. 09:55 Creating temporary variables to handle meta data to be used by Paginator. 11:23 Retrieve GET argument from the URL through the Request object in Zend Expressive 18:09 Add URL arguments to the routes of FastRoute 23:30 Add _embedded hypermedia container to results Other Beachcasts PHP tech videos you might find interesting: Critical programming issues preventing a PHP 7 upgrade https://youtu.be/z13glyDnm6s Behat for beginners functional REST API testing tutorial https://youtu.be/nFNGDhyFrm4 Doctrine ORM one-to-many bi-directional association https://youtu.be/4nEdBDxBc1w PHP Mess Detector static analysis to find PHP code smells https://youtu.be/8fEfHESrK5E Doctrine ORM one-to-many self-referencing association https://youtu.be/4dHZ6cZooOk 10 reasons to become a consultant in a consulting business https://youtu.be/J7gpMYAKmDM Zend Framework becomes Laminas project at Linux Foundation https://youtu.be/CEIO90ocEDI 10 bad things about consulting https://youtu.be/ELE0G3e7h3c How to get lines of code in PHP https://youtu.be/HpC-Cvxj6oY Make a List handler middleware https://youtu.be/VLqavHCFv6g Make a Delete handler middleware https://youtu.be/3nLbQfMk99k Make an Update handler middleware https://youtu.be/3Zcq5Jjz1Po Use UUID with Doctrine ORM for DB keys https://youtu.be/SYuLwMwSIpg Make a Create handler middlware https://youtu.be/FIYh-VIWUko Learn about Hypermedia and how to create it https://youtu.be/aV6ro_JXL_A Doctrine ORM Entity how to https://youtu.be/NnK9Geg1h_E Configure Doctrine ORM https://youtu.be/pFvh5ZNhdOQ Create PHP middlware with Zend Expressive https://youtu.be/26440j7D0BE Configure PhpStorm for PHP development with Docker https://youtu.be/FQWL-JTZvf4 Create PHP development environment with docker https://youtu.be/2ESAi2vq-80 Help through referrals: Thinking of buying a Tesla electric vehicle? Use this referral link to also get six months of free Supercharging for both of us. Thank you. https://www.tesla.com/referral/tanya21367 I use TubeBuddy to help me manage my YouTube channel. If you're interested, click the following link to check it out. https://www.tubebuddy.com/beachcasts Help support Doctrine ORM: https://www.doctrine-project.org/sponsorship.html #DoctrineORM #ZendExpressive #Beachcasts

Download

1 formats

Video Formats

360pmp441.5 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Doctrine ORM Paginator in PHP REST API with Expressive - 006 | NatokHD