PHP Classes

File: Pgw.php

Recommend this page to a friend!
  Classes of Thierry Feuzeu   Jaxon for Laravel   Pgw.php   Download  
File: Pgw.php
Role: Example script
Content type: text/plain
Description: Sample Jaxon class
Class: Jaxon for Laravel
Laravel plugin to call PHP classes from with AJAX
Author: By
Last change:
Date: 7 years ago
Size: 1,044 bytes
 

Contents

Class file image Download
<?php

namespace Jaxon\App\Test;

use
Jaxon\Request\Factory as xr;
use
Jaxon\Laravel\Controller as JaxonController;

class
Pgw extends JaxonController
{
    public function
sayHello($isCaps)
    {
        if (
$isCaps)
           
$text = 'HELLO WORLD!';
        else
           
$text = 'Hello World!';
   
       
$this->response->assign('div1', 'innerHTML', $text);
       
$this->response->toastr->success("div1 text is now $text");
   
        return
$this->response;
    }

    public function
setColor($sColor)
    {
       
$this->response->assign('div1', 'style.color', $sColor);
       
$this->response->toastr->success("div1 color is now $sColor");
   
        return
$this->response;
    }

    public function
showDialog()
    {
       
$buttons = array(array('title' => 'Close', 'class' => 'btn', 'click' => 'close'));
       
$options = array('maxWidth' => 400);
       
$this->response->pgw->modal("Modal Dialog", "This modal dialog is powered by PgwModal!!", $buttons, $options);
   
        return
$this->response;
    }
}