PHP code example of ahmed-hussain / hasmany-to-modal

1. Go to this page and download the library: Download ahmed-hussain/hasmany-to-modal library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ahmed-hussain / hasmany-to-modal example snippets


    /**
     * The size of the modal. Can be "sm", "md", "lg", "xl", "2xl", "3xl", "4xl", "5xl", "6xl", "7xl", "full-screen".
     */

use AhmedHussain\HasmanyToModal\HasmanyToModal;

                    HasmanyToModal::make(__('Comments'), 'Comments', Comments::class)
                        ->perPage(50)//count rows show in index
                        ->modalSize('2xl'),

#for Full Screen
                    HasmanyToModal::make(__('Comments'), 'Comments', Comments::class)
                        ->perPage(50)
                        ->modalSize('full-screen'),