laravel中未定义常量php错误消息

laravel中未定义常量php错误消息,php,html,laravel,Php,Html,Laravel,我是MVC框架的新手。我在Laravel框架中创建了一个应用程序&它运行良好。现在,当我想查看索引页面时,经过一些修改后,下面的错误显示给我- 信息: 使用未定义的常量php-假定为“php” 地点: C:\wamp\www\alpha.team.com\laravel\view.php(354):eval()的代码 第32行 这是我的index.blade.php视图代码 @layout('/layouts/layout') <link href='http://fon

我是MVC框架的新手。我在Laravel框架中创建了一个应用程序&它运行良好。现在,当我想查看索引页面时,经过一些修改后,下面的错误显示给我-

信息:

使用未定义的常量php-假定为“php”

地点:

C:\wamp\www\alpha.team.com\laravel\view.php(354):eval()的代码 第32行

这是我的index.blade.php视图代码

@layout('/layouts/layout')
         <link href='http://fonts.googleapis.com/css?family=Neucha' rel='stylesheet' type='text/css'> 
         <div id="top">
        @section('navigation')
        <!-- <li class="active"><a href="/home/view/<?php //echo Auth::user()->username; ?>"><i class="icon-user"></i>&nbsp;My Profile</a></li> -->
        <li><a href = "/dashboard"><i class="icon-book"></i>&nbsp;Dashboard</a></li>
        @parent
        @endsection
          </div>
         @section('content')
         <!-- For showing error message if any error occours-->
          <?php if(Session::get('error')): ?>
          <div class="alert alert-error">
           <button type="button" class="close" data-dismiss="alert">×</button>
           <strong>Warning!</strong> <?php echo Session::get('error'); ?>
         </div>
         <?php endif; ?>

         <!-- For showing success message.-->
             <?php if(Session::get('success')): ?>
             <div class="alert alert-success">
                <button type="button" class="close" data-dismiss="alert">×</button>
                <strong>Well done!</strong> <?php echo Session::get('success'); ?>
             </div>
             <?php endif; ?>

         <div class="field-section">
          <div class="hero-unit">
            <!-- <a id="logo" href="#"><img alt="TechIndyeah" src="/uploads/logo.png" style="vertical-align: top;"></a> -->
            <h1 style="display:inline;">Team TechIndyeah</h1>
              <ul class="teams" style="text-align:center;">  
                             @foreach($departments as $dept)
                             <?php// print_r($dept); ?>
                               <li>
                                 <a href="#<?php echo implode('_',explode(' ',$dept->name));?>"><?php echo $dept->name; ?></a>
                               </li> 
                               @endforeach
                           </ul>
          </div>
         </div> <!-- field-section div ends here-->
         <!-- <div class="container"> -->
          <div class="wrapper">

         <div class="hero-unit" id="bg-pattern"> 

          <h1 class="home-tag"> Tech-ing India<span><p>The team of enthusiastic tech fanatics</p></span></h1>
            <p class="home-ptag">We are a team of enthusiastic tech fanatics and yes we are Apple fanboys too. We have sailed out together on a small boat and we do live in what Seth Godin says, “Small is the next big”. We love technology and we love you. Our team is free, creative and always brimming with ideas.</p>
              <div class="row" style="background:none;">
                <div class="span8">
                  <h1 class="home-tag" >About Us</h1>
                  <p class="home-ptag">TechIndyeah has a team which is highly process oriented and has a sharp client-centric approach. Our mission is to help you to build your footprints in business. We are a team inspired by a vision and driven by technology. We are driven by an offbeat approach when it comes to client servicing and support. We have been serving our clients for a long time and have won accolades galore. We are a team and we believe in making our time resourceful so that our clients get the most out of us. We are a band of developers, designers and marketers who can take your business online and also combat the stiff competition from similar players in your domain.  </p>
                </div>
                <div class="span3">
                  <object type="image/svg+xml" data="/img/logo.svg">
                  <img alt="TechIndyeah" src="/img/logo.png" style="vertical-align:top;">
                </object>
                </div>
              </div>

          <div class="row">
            <div class="span4">
          <!-- <a id="logo" href="#"><img alt="TechIndyeah" src="/uploads/logo.png"></a> -->
        </div>

        <!-- <div class="span6" id="caption">
          <h3>Here We Are</h3>
        </div> -->
        </div>
              <div class="row">
                     <?php $something = $errors->all(); 
                     if(!empty($something)): ?>
                    <div class = "alert alert-error">    
                    <button type="button" class="close" data-dismiss="alert">×</button>                    
                                              @foreach ($errors->all('<p>:message</p>') as $input_error)
                                              {{ $input_error }}
                                              @endforeach 
                              </div>              
                     <?php endif; ?>                
              </div>
              <!-- For showing all employee name in the front page.. Showcasing them..-->
                   <div id="hero-unit">     
                           <script type="text/javascript">



                              //The departments are randomly comming in the page when it is first loaded..
                             (function($) {
                                     // Get the list items and hide them
                                     var items = $(".teams > li").css({opacity:0});
                                     // Shuffle them
                                     shuffle(items);
                                     // Start the fade-in queue
                                     nextItemFade(items);

                                     // Animation callback to start next fade-in
                                     function nextItemFade(items) {
                                             // Fade in the first element in the collection
                                             items.eq(0).animate({opacity:1}, 400, function() {
                                                     // Recurse, but without the first element
                                                     nextItemFade(items.slice(1));
                                             });
                                     }

                                     // Shuffles an array
                                     // Based on http://jsfromhell.com/array/shuffle
                                     function shuffle(a) {
                                             var j,              // Random position
                                                 x,              // Last item
                                                 i = a.length;   // Iterator
                                             // Loop through the array
                                             while(i) {
                                                     // Select a random position
                                                     j = (Math.random() * i) | 0;
                                                     // Get the last item in the array
                                                     x = a[--i];
                                                     // Swap the last item with the item at the selected position
                                                     a[i] = a[j];
                                                     a[j] = x;
                                             }
                                             return a;
                                     }

                                     /* Minified version
                                     function shuffle(a) {
                                             for(var j, x, i = a.length; i; j = (Math.random() * i) | 0, x = a[--i], a[i] = a[j], a[j] = x);
                                             return a;
                                     } */
                             })(jQuery);

                             $(".nav1 li").each(
                             function(intIndex) {

                             var l = Math.floor(Math.random() * $(".nav1").width());
                             var t = Math.floor(Math.random() * $(".nav1").height());

                             $(this).css("left", l);
                             $(this).css("top", t);

                             $(this).on(
                                 "click",
                                     function() {
                                         alert("l=" + l + " t=" + t);
                                     }
                                 );

                             }

                             );

                             $(".nav1 li").each(
                             function(intIndex) {

                             var l = Math.floor(Math.random() * 940);
                             var t = Math.floor(Math.random() * 500);

                             $(this).css("left", l);
                             $(this).css("top", t);

                             $(this).on(
                                 "click",
                                     function() {
                                         alert("l=" + l + " t=" + t);
                                     }
                                 );

                             }

                             );


                           </script>
                            <style type="text/css">
                            .nav1
                            {
                              position:relative;
                            }


                               .nav1 li
                               {
                                   padding: 10px;
                                   position:absolute;
                               }
                           </style>

                        </div> <!-- #hero-unit ends here--> 
                        <!-- </div>  mucarousel div ends here  -->
                 <div class="member-list">
                    <!-- <object type="image/svg+xml" data="/img/vector-tree2.svg"> -->
                    <!-- <img alt="TechIndyeah" src="/img/vector-tree2.png" style="vertical-align:top;"> -->
                  <!-- </object> -->
                 @foreach($departments as $dept)
                 <div id="<?php echo implode('_',explode(' ',$dept->name));?>" class="demo">
                  <ul class="member">
                    <?php $users = User::where('department_id','=',$dept->id)->get();
                       // $users = User::where('department_code','=',$dept->code)->get();
                     ?>
                     @foreach($users as $user)
                     <li class="new-element" style="display:inline-block;" rel="tooltip" data-placement="right" data-original-title="<?php echo $user->first_name." ".$user->last_name;?>">
                       <a href="/home/view/<?php echo $user->username;?>" rel="tooltip" data-placement="right" href="#" data-original-title="<?php echo $user->first_name." ".$user->last_name."</br> ".$user->designation;?>">
                         <img class="hover-img" src="http://graph.facebook.com/<?php echo $user->facebook_id;?>/picture?type=large">
                       </a>
                     </li>
                     @endforeach
                  </ul>
                  <a href="#top" class="scrollup">Back To Top</a>


                 </div>
                @endforeach
                   <script type="text/javascript">
                  $(window).scroll(function(){
                          if ($(this).scrollTop() > 50) {
                              $('.scrollup').fadeIn();
                          } else {
                              $('.scrollup').fadeOut();
                          }
                      });     
                   </script>
                 <script type="text/javascript">
                //all links which start with a # will have an animated scroll to the target.
                    $('a[href^="#"]').on('click.smoothscroll',function (e) {
                        e.preventDefault();
                        var target = this.hash,
                            $target = $(target);
                            // console.log($target);
                        $('html, body').stop().animate({
                            'scrollTop': $target.offset().top - 10
                        }, 900, 'swing', function () {
                            window.location.hash = target;
                        });
                    });

                   $('.new-element').children('a').tooltip();
                   </script>
                </div>
                <h1 style="text-align:center;font-family: 'Lato light', sans-serif;text-shadow: 2px 1px #848686;">TechIndyeah Software Pvt. Ltd.</h1>
              </div>
         </div>     
         @endsection
         </div>
@layout('/layouts/layout'))
@节(“导航”)
  • @母公司 @端部 @节(“内容”) × 警告 × 干得好 技术小组是的
      @foreach($department作为$dept)
    • @endforeach
    印度科技一群狂热的科技狂热者

    我们是一群狂热的技术狂热者,是的,我们也是苹果迷。我们一起乘着一艘小船出海,我们确实生活在赛斯·戈丁所说的“小就是下一个大”中。我们热爱科技,我们也爱你们。我们的团队是自由的,有创造力的,总是充满了想法

    关于我们

    TechIndyeah拥有一支高度以流程为导向、以客户为中心的团队。我们的使命是帮助您在业务上留下足迹。我们是一支以愿景为灵感、以技术为动力的团队。在客户服务和支持方面,我们以一种与众不同的方法为动力。我们为客户服务了很长一段时间,赢得了很多赞誉。我们是一个团队,我们相信让我们的时间足智多谋,让我们的客户从我们身上得到最大的好处。我们是一个由开发者、设计师和营销人员组成的团队,他们可以将您的业务带到网上,也可以与您所在领域的类似公司的激烈竞争作斗争

    × @foreach($errors->all(“:message

    ”)作为$input\u error) {{$input_error}} @endforeach //第一次加载页面时,部门在页面中随机提交。。 (函数($){ //获取列表项并隐藏它们 var items=$(“.teams>li”).css({opacity:0}); //洗牌 洗牌(项目); //启动淡入队列 nextItemFade(项目); //动画回调以开始下一次淡入 函数nextItemFade(项目){ //淡入集合中的第一个元素 eq(0).animate({opacity:1},400,function(){ //递归,但不包含第一个元素 nextItemFade(items.slice(1)); }); } //洗牌 //基于http://jsfromhell.com/array/shuffle 函数洗牌(a){ var j,//随机位置 x、 //最后一项 i=a.length;//迭代器 //在数组中循环 而(i){ //选择一个随机位置 j=(Math.random()*i)| 0; //获取数组中的最后一项 x=a[--i]; //将最后一个项目与选定位置的项目交换 a[i]=a[j]; a[j]=x; } 返回a; } /*缩小版 函数洗牌(a){ 对于(var j,x,i=a.length;i;j=(Math.random()*i)|0,x=a[--i],a[i]=a[j],a[j]=x); 返回a; } */ })(jQuery);
    echo $data[php];   //you have this
    echo $data['php']; //but it should be this
    //or
    if(php == $var){}   //you have this
    if('php' == $var){} //but it should be this