dongxuanchao1425 2018-12-13 11:21
浏览 46
已采纳

如何在Yajrabox中添加show data按钮

Im working with Laravel and im asking how can I add a button that send me to a page that can show my data I have already made it but I don't know how to add the button in Yajrabox form Im talking about this one:

<td>
 <a  href="{{ url('sujet/'.$sujet->id.'/afficher') }}" class="btn btn-info"> See the informations  </a>
</td>

This is my Yajrabox view:

<html>
<head>
</head>
<body>
  <!-- Static navbar -->
  <nav class="navbar navbar-inverse">
    <div class="container-fluid">
      <div class="navbar-header">
        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
          <a class="navbar-brand" href="{{url('/accueil')}}"><span style="font-size:30px;font-family:'Cairo';color:silver">الغلبزوزي</span></a>
      </div>
      <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
        <ul class="nav navbar-nav">

          <li style="padding:5px"> <a href="{{url('archive')}}"> <strong style="font-size:15px;padding:5px">أرشيف</strong> &nbsp <span class="glyphicon glyphicon-folder-open pull-right"> </span> </a></li>

             <li style="padding:5px" > <a href="{{url('/client')}}"> <strong style="font-size:15px;padding:5px">  الموكلون </strong> &nbsp <span class="glyphicon glyphicon-user pull-right"> </span> </span></a></li>

             <li style="padding:5px"> <a href="{{url('sujet')}}"> <strong style="font-size:15px;padding:5px"> الملفات </strong> &nbsp<span class="glyphicon glyphicon-book pull-right"> </span></a></li>

             <li style="padding:5px"> <a href="{{url('session')}}"> <strong style="font-size:15px;padding:5px"> الجلسات </strong> &nbsp <span class="glyphicon glyphicon-home pull-right"> </span> </a></li>
             <li style="padding:5px"> <a href="{{url('facture')}}"> <strong style="font-size:15px;padding:5px">مصاريف</strong> &nbsp <span class="glyphicon glyphicon-euro pull-right"> </span> </a></li>

             <li style="padding:5px" ><a href="{{url('sujet/recherche')}}" > <strong style="font-size:15px;padding:5px"> بحث </strong> &nbsp<span class="glyphicon glyphicon-search pull-right"></span></a></li>





        </ul>
      </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
  </nav>
<div style="text-align: right" class=" container ">

  <img class="responsive" style="width:100%" src="{{asset('img/projet-elghalbzouri.jpg')}}" />
  <div class="row">
    <div class="col-md-12">


    <div class="table-responsive">
      <table  class="table border" border="1" id="myTable" >
        <thead>
        <tr>
          <th>رقم الملف بالمكتب</th>

          <th>الموضوع</th>
          <th>تاريخ فتح الملف</th>

        </tr>
      </thead>

      </table>

    </div>



    </div>
</div>
</div>

<script src="https://datatables.yajrabox.com/js/jquery.min.js"></script>
<script src="https://datatables.yajrabox.com/js/bootstrap.min.js"></script>
<script src="https://datatables.yajrabox.com/js/jquery.dataTables.min.js"></script>
<script src="https://datatables.yajrabox.com/js/datatables.bootstrap.js"></script>


<script type="text/javascript">
$(function() {
     $('#myTable').DataTable({
         processing: true,
         serverSide: true,
         ajax: '/sujet/data',


         columns: [
           {data: 'id'},
           {data: 'nomsujet'},
           {data: 'tarikhfathmilaf'},

       ]
     });
 });
</script>

</body>
</html>

This button send me to a view that show my data, how can I added that one in Yajrabox please?

  • 写回答

1条回答 默认 最新

  • doujingdai5521 2018-12-13 11:28
    关注

    You should try this:

    Your Route like:

    Route::get('sujet/{id}/afficher',"yourcontroller@yourfunction")->name('sujet.afficher');
    
    <td>
     <a  href="{{ route('sujet.afficher', [$sujet->id]) }}" class="btn btn-info"> See the informations  </a>
    </td>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?
  • ¥15 matlab(相关搜索:紧聚焦)
  • ¥15 基于51单片机的厨房煤气泄露检测报警系统设计
  • ¥15 Arduino无法同时连接多个hx711模块,如何解决?
  • ¥50 需求一个up主付费课程
  • ¥20 模型在y分布之外的数据上预测能力不好如何解决