Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Mottapg Bundle Laravel Package

agusmoita/mottapg-bundle

View on GitHub
Deep Wiki
Context7

MottaPgBundle


Installation

  • Add via composer
    $ composer require agusmoita/mottapg-bundle
    

Usage

  • Controller

    use MottaPgBundle\Util\Paginator\Paginator;
    
    /**
     * @Route("/", name="person_index", methods={"GET|POST"})
     */
    public function indexAction(Paginator $pg, PersonRepository $repo)
    {
        return $pg
                ->setView('person/index.html.twig')
                ->paginate($repo);
    }
    
  • Repository

    // PersonRepository.php
    
    public function buildQuery($query, $pg)
    {
        // return SELECT a FROM AppBundle:Person a
        return $query;
    }
    
  • View

    {# person/index.html.twig #}
    
    {% extends '@MottaPg/Paginator/table.html.twig' %}
    
    {% block title %}
        <h1>List of People</h1>
    {% endblock %}
    
    {% block paginator_table_header %}
        <th>First Name</th>
        <th>Last Name</th>
        <th>Birthday</th>
    {% endblock %}
    
    {% block paginator_table_data %}
        <td>{{ entity.firstName }}</td>
        <td>{{ entity.lastName }}</td>
        <td>{{ entity.birthday|date('m-d-Y') }}</td>
    {% endblock %}
    

License

MIT License

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor
spatie/laravel-javascript-views