PHP code example of czim / laravel-pxlcms

1. Go to this page and download the library: Download czim/laravel-pxlcms 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/ */

    

czim / laravel-pxlcms example snippets


    Czim\PxlCms\PxlCmsServiceProvider::class,

   // For a model with a relationship: images() to the CMS Image model
   $model->images
 

   $image = $model->images->first();

   // This will return the external URL to the (base) image
   $image->url

   // This will return the local path to the file
   $image->localPath

   // This will list all resizes with appended prefixes and full URLs
   $image->resizes

   // Return image results for locale other than the active application locale
   $englishImage = $model->images('en')->first();
   $dutchImage   = $model->images('nl')->first();
 bash
$ php artisan vendor:publish