PHP code example of monstar-lab-oss / n-meta-laravel

1. Go to this page and download the library: Download monstar-lab-oss/n-meta-laravel 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/ */

    

monstar-lab-oss / n-meta-laravel example snippets


NMeta\ServiceProvider::class

// in RouteServiceProvider
protected function mapApiRoutes()
{
    Route::prefix('api')
        ->middleware('api')
        ->middleware(NMetaMiddleware::class) // Add NMeta middleware
        ->namespace($this->namespace)
        ->group(base_path('routes/api.php'));
}

nmeta()->getPlatform()
nmeta()->getVersion()

php artisan vendor:publish --provider="NMeta\ServiceProvider"