PHP Classes

File: Bts.php

Recommend this page to a friend!
  Classes of Thierry Feuzeu   Jaxon for Laravel   Bts.php   Download  
File: Bts.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: 8 years ago
Size: 1,034 bytes
 

Contents

Class file image Download
<?php

namespace Jaxon\App\Test;

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

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

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

    public function
showDialog()
    {
       
$buttons = array(array('title' => 'Close', 'class' => 'btn', 'click' => 'close'));
       
$width = 300;
       
$this->response->bootstrap->modal("Modal Dialog", "This modal dialog is powered by Twitter Bootstrap!!", $buttons, $width);
   
        return
$this->response;
    }
}