PHP code example of aacassandra / mesosfer-php-lib

1. Go to this page and download the library: Download aacassandra/mesosfer-php-lib 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/ */

    

aacassandra / mesosfer-php-lib example snippets


use Mesosfer\MesosferLib;

class ExamplesController extends Controller
{
  public function index(Request $request, $className, $id)
  {
      $options = [
        "er->output;
          return view($this->indexView, compact('data'));
      } else {
          //If server down
          $data = [];
          return view($this->indexView, compact('data'));
      }
  }  
}

use Mesosfer\MesosferLib;

class ExamplesController extends Controller
{
  public function index(Request $request, $className)
  {
      $options = [
        "osfer->output;
      } else {
          //If server down
      }
  }  
}
 

use Mesosfer\MesosferLib;

class ExamplesController extends Controller
{
  public function create(Request $request, $className)
  {
        $data = [
          ['pointer','floor',$request->adFloor,'Floor'],
          ['array','videoAds',$request->adVideo],
          ['array','smallAds',$request->adSmall],
          ['string','mediumAds',$request->adMedium,],
          ['array','bigAds',$request->adBig]
        ];

        $mesosfer = MesosferLib::storeObject($className, $data);
        if ($mesosfer->status) {
            // If Success
        } else {
            // If failed
        }
  }  
}
 

 use Mesosfer\MesosferLib;

class ExamplesController extends Controller
{
  public function update(Request $request, $className, $id)
  {
        $data = [
          ['pointer','floor',$request->adFloor,'Floor'],
          ['array','videoAds',$request->adVideo],
          ['array','smallAds',$request->adSmall],
          ['string','mediumAds',$request->adMedium,],
          ['array','bigAds',$request->adBig]
        ];

        $mesosfer = MesosferLib::updateObject($className, $id, $data);
        if ($mesosfer->status) {
            // If Success
        } else {
            // If failed
        }
  }  
}
 

 use Mesosfer\MesosferLib;

class ExamplesController extends Controller
{
  public function update(Request $request, $className, $id)
  {
        $mesosfer = MesosferLib::deleteObject($className, $id);
        if ($mesosfer->status) {
            // If Success
        } else {
            // If failed
        }
  }  
}