/**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store()
 {
     $route = Route::getCurrentRoute()->getPath();
     if ('/admin/disciplinas' == $route) {
         $conteudoDisciplinas = new Disciplinas();
         /*$id = Input::get('id');
           if($id>0){
               $conteudoDisciplinas = Disciplinas::find($id);
           }*/
         $conteudoDisciplinas->nome_dis = Request::get('nomeDisciplina');
         $conteudoDisciplinas->codigo_dis = Request::get('codigoDisciplina');
         $conteudoDisciplinas->periodo_dis = Request::get('periodoDisciplina');
         $conteudoDisciplinas->save();
         $value = array('success' => true);
         //        return json_encode($value);
         return Redirect::to('/admin/disciplinas');
     }
     if ('/admin/professores' == $route) {
         return 'oi';
     }
     /*switch($route){
                 case '/admin/disciplinas/add':
                     $queryBuilder = 'Disciplinas';
                     break;
                 default:
                     break;
             }
     
             $updater    = new $queryBuilder();*/
 }
          <h1>Disciplinas</h1>
        </section>
        <!-- Main content -->
        <section class="content">
          <div class="row">
            <div class="col-lg-12">
              <!-- Horizontal Form -->
              <div class="box box-info">
                <div class="box-header with-border">
                  <h3 class="box-title">Disciplinas</h3>
                </div><!-- /.box-header -->
                <?php 
$id = $_POST["id"];
$curso = $_POST['curso'];
if (isset($_POST["exibir"])) {
    $exib = new Disciplinas();
    $comp = $exib->ShowDisciplinas($id);
    if ($exib != null) {
        ?>
                <div class="box-body">
                  <div class="form-group">
                    <dl class="dl-horizontal">
                      <dt>Curso:</dt>
                      <dd><?php 
        echo $comp->curso;
        ?>
</dd>
                      <dt>Disciplina:</dt>
                      <dd><?php 
        echo $comp->disciplina;
        ?>
<?php

include_once "../../class/Carrega.class.php";
if (isset($_POST['enviar'])) {
    $object = new Disciplinas();
    $object->disciplina = $_POST['disciplina'];
    $object->curso = $_POST['curso'];
    $object->InserirDisciplinas();
    header("Location:PreviewDisciplinasObj.php");
} else {
    if (isset($_POST['atualizar'])) {
        $object = new Disciplinas();
        $object->id = $_POST['id'];
        $object->disciplina = $_POST['disciplina'];
        $object->curso = $_POST['curso'];
        $object->AtualizarDisciplinas();
        header("Location:PreviewDisciplinasObj.php");
    } else {
        if (isset($_POST['excluir'])) {
            $object = new Disciplinas();
            $object->id = $_POST['id'];
            $object->ExcluirDisciplinas();
            header("Location:PreviewDisciplinasObj.php");
        }
    }
}
          <h1>Disciplinas</h1>
          </section>
        <!-- Main content -->
        <section class="content">
          <div class="row">
            <div class="col-lg-12">
              <!-- Horizontal Form -->
              <div class="box box-success">
                <div class="box-header with-border">
                  <h3 class="box-title">Cadastro de disciplinas</h3>
                </div><!-- /.box-header -->
                <!-- form start -->
                <?php 
$id = $_POST["id"];
if (isset($_POST["editar"])) {
    $edit = new Disciplinas();
    $comp = $edit->EditarDisciplinas($id);
    //print_r($comp);
    //var_dump($comp);
    if ($edit != null) {
        ?>
                <form class="form-horizontal" id="form" method="post" action="CrudDisciplinas.php">
                  <div class="box-body">
                      <div class="form-group">
                        <label for="disciplina" class="col-sm-2 control-label">Disciplina:</label>
                        <div class="col-sm-10">
                          <input type="text" class="form-control" name="disciplina" id="disciplina" placeholder="Digite o categoria aqui" value="<?php 
        echo $comp->disciplina;
        ?>
" required>
                        </div>
                  <h3 class="box-title">Listagem de disciplinas</h3>
                  <a class="btn btn-info btn-flat pull-right" href="ViewDisciplinasObj.php" title="Atualizar resultados" data-toggle="tooltip" data-placement="left"><i class="fa fa-refresh"></i></a>
                </div><!-- /.box-header -->
                <div class="box-body">
                  <table id="dataT" class="table table-bordered table-hover">
                    <thead>
                      <tr>
                        <th>Disciplina</th>
                        <th>Opções</th>
                      </tr>
                    </thead>
                    <tbody>
                    <?php 
$curso = $_POST["curso"];
if (isset($_POST['pesquisar']) || isset($_POST['retornar'])) {
    $listar = new Disciplinas();
    $list = $listar->ListarEspecifyDisciplinas($curso);
    if ($list != null) {
        foreach ($list as $line) {
            ?>
                      <tr class="odd gradeX">
                        <form name="view" action="EditDisciplinaObj.php" method="post">
                        <td><?php 
            echo $line->disciplina;
            ?>
</td>
                        <td>
                          <input type='hidden' name='id' value='<?php 
            echo $line->id;
            ?>
'>