PHP code example of lambdadigamma / mm-pages

1. Go to this page and download the library: Download lambdadigamma/mm-pages 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/ */

    

lambdadigamma / mm-pages example snippets




return [

    'page_model' => LambdaDigamma\MMPages\Models\Page::class,

    'page_block_model' => LambdaDigamma\MMPages\Models\PageBlock::class,

    /**
     * The api endpoints are being registered
     * under this prefix.
     */
    'api_prefix' => 'api',

    /**
     * This option is being used to disable
     * the page detail endpoint.
     */
    'api_disable_page_endpoint' => false,

    /**
     * This middleware stack is being
     * used for all api routes.
     */
    'api_middleware' => ['api'],

    /**
     * The admin endpoints are being registered
     * under this prefix.
     */
    'admin_prefix' => 'admin',

    /**
     * This middleware stack is being
     * used for all api routes.
     */
    'admin_middleware' => ['web', 'auth'],

    'admin_middleware_stateless' => ['api', 'auth'],

];
bash
php artisan vendor:publish --provider="LambdaDigamma\MMPages\MMPagesServiceProvider" --tag="migrations"
php artisan migrate
bash
php artisan vendor:publish --provider="LambdaDigamma\MMPages\MMPagesServiceProvider" --tag="config"