File: app/example/controller/logincontroller.class.php

Recommend this page to a friend!
  Classes of Carlos Eduardo Barcelos Amaral  >  Base MVC Framework  >  app/example/controller/logincontroller.class.php  >  Download  
File: app/example/controller/logincontroller.class.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Base MVC Framework
MVC framework to be the base of Web applications
Author: By
Last change: Merge branch 'master' of https://github.com/KaduAmaral/Base
Date: 4 years ago
Size: 1,147 bytes
 

Contents

Class file image Download
<?php
namespace Controller;

use \
Core\Controller;


class
LoginController extends Controller
{

  
/**
    * @Route("/entrar", {"name":"entrar"})
    */
  
function index() {
      return
$this->load->view('layouts/default', [
        
'content' => '<div class="container"><div class="col-xs-12 col-sm-6 col-sm-offset-3">'.
           
'<div class="page-header"><h1>Entrar</h1></div>'.
           
$this->load->view('commons/login-form').
           
'</div></div>'
     
]);
   }

  
/**
    * @Route("/login", {"name":"login"})
    */
  
function login() {
      return
$this->load->content(
        
'%header% %menu%'.
        
'<div class="container"><div class="col-xs-12 col-sm-6 col-sm-offset-3">'.
        
'<div class="page-header"><h1>Dados do Login</h1></div>'.
        
'<pre class="well">%login%</pre>'.
        
'</div></div>'.
        
'%footer%',
         Array(
           
'header' => $this->load->view('commons/head'),
           
'menu' => $this->load->view('commons/menu'),
           
'footer' =>$this->load->view('commons/footer'),
           
'login' => var_export($this->request->post, TRUE)
         )
      );
   }
}

For more information send a message to info at phpclasses dot org.