2017-10-06 2 views
0

컨트롤러와 각각 그 내용을 볼 수있는 링크를 가지고 해당 링크로 연결하는 코드이다통과 값 i가 많은 제품을 표시하는 페이지를

<a class="btn-danger" href="{{ url('viewpartydetails/'.$party->party_id) }}"> 
        view details 
       </a> 

이있다 경로 : Route::get('viewpartydetails/{party_id}','[email protected]');

이 컨트롤러에 코드입니다 :

public function partydetails($party_id) 
    { 
     if(!Auth::guest()) 
     { // $party_id=request('partyid'); 
      $party = DB::table('party1')->where('party_id',$party_id)->get(); 
      //dd($party_id); 
      return view('partydetails',compact('party')); 
     } 
     else 
      return redirect()->guest('login'); 

    } 

문제는 내가 어떤없이 나타나고있다 표시 할 페이지입니다 디자인 !!! 하지만이 부분을 삭제하면 "/ {party_id}"모든 디자인이 다시 표시됩니다 !!! 무엇이 문제입니까?

@extends('layouts.app') 

@section('content') 
    <div id="fh5co-main"> 
     <div class="fh5co-narrow-content"> 
      <div class="row"> 
       <div class="col-md-5"> 
        <h2 class="fh5co-heading animate-box" data-animate-effect="fadeInLeft">About Us Nitro <span>A Web Studio</span></h2> 
        <p class="fh5co-lead animate-box" data-animate-effect="fadeInLeft">Separated they live in Bookmarksgrove right at the coast of the Semantics, a large language ocean.</p> 
        <p class="animate-box" data-animate-effect="fadeInLeft"> Even the all-powerful Pointing has no control about the blind texts it is an almost unorthographic life One day however a small line of blind text by the name of Lorem Ipsum decided to leave for the far World of Grammar.</p> 
       </div> 
       <div class="col-md-6 col-md-push-1 animate-box" data-animate-effect="fadeInLeft"> 
        <img src="images/img_1.jpg" alt="Free HTML5 Bootstrap Template" class="img-responsive"> 
       </div> 
      </div> 

     </div> 
    </div> 
@stop 

app.blade 코드 : 문제는 당신의 differents에서 오는

<!DOCTYPE html> 
<html lang="{{ app()->getLocale() }}"> 
<head> 
    <meta charset="utf-8"> 
    <meta http-equiv="X-UA-Compatible" content="IE=edge"> 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 

    <!-- CSRF Token --> 
    <meta name="csrf-token" content="{{ csrf_token() }}"> 

    <title>{{ config('app.name', 'Laravel') }}</title> 

    <!-- Styles --> 
    <link href="{{ asset('css/app.css') }}" rel="stylesheet"> 
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"> 
    <!-- #Dışarıdan Çağırılan Dosyalar Font we Materyal İkonlar Bitiş --> 

    <link rel="stylesheet" type="text/css" href="css/style1.css"> 
    <link rel="shortcut icon" href="favicon.ico"> 

    <link href='https://fonts.googleapis.com/css?family=Roboto:400,300,600,400italic,700' rel='stylesheet' type='text/css'> 


    <!-- Animate.css --> 
    <link rel="stylesheet" href="css/animate.css"> 
    <!-- Icomoon Icon Fonts--> 
    <link rel="stylesheet" href="css/icomoon.css"> 
    <!-- Bootstrap --> 
    <link rel="stylesheet" href="css/bootstrap.css"> 
    <!-- Owl Carousel --> 
    <link rel="stylesheet" href="css/owl.carousel.min.css"> 
    <link rel="stylesheet" href="css/owl.theme.default.min.css"> 
    <!-- Theme style --> 
    <link rel="stylesheet" href="css/style.css"> 

    <!-- Modernizr JS --> 
    <script src="js/modernizr-2.6.2.min.js"></script> 
</head> 
<body background="images/party1.jpeg"> 

    <div id="app"> 

     <nav class="navbar navbar-default navbar-static-top"> 
      <div class="container"> 
       <div class="navbar-header"> 

        <!-- Collapsed Hamburger --> 
        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#app-navbar-collapse"> 
         <span class="sr-only">Toggle Navigation</span> 
         <span class="icon-bar"></span> 
         <span class="icon-bar"></span> 
         <span class="icon-bar"></span> 
        </button> 

        <!-- Branding Image --> 
        <a class="navbar-brand" href="{{ url('/') }}"> 
         {{ config('app.name', 'Laravel') }} 
        </a> 
       </div> 

       <div class="collapse navbar-collapse" id="app-navbar-collapse"> 
        <!-- Left Side Of Navbar --> 
        <ul class="nav navbar-nav"> 
         &nbsp; 
        </ul> 

        <!-- Right Side Of Navbar --> 
        <ul class="nav navbar-nav navbar-right"> 
         <!-- Authentication Links --> 
         @if (Auth::guest()) 
          <li><a href="{{ route('login') }}">Login</a></li> 
          <li><a href="{{ route('register') }}">Register</a></li> 
         @else 
          <li class="dropdown"> 
           <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> 
            {{ Auth::user()->name }} <span class="caret"></span> 
           </a> 

           <ul class="dropdown-menu" role="menu"> 
            <li> 
             <a href="{{ route('logout') }}" 
              onclick="event.preventDefault(); 
                document.getElementById('logout-form').submit();"> 
              Logout 
             </a> 

             <form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;"> 
              {{ csrf_field() }} 
             </form> 
            </li> 
            <li> 
             <a href="{{ url('viewparties') }}"> 
              view parties 
             </a> 

            </li> 
            @if(Auth::user()->user_type=="organizer") 
            <li> 
             <a href="{{ url('add_party') }}"> 
              add a party 
             </a> 
            </li> 
            @endif 
           </ul> 
          </li> 
         @endif 
        </ul> 
       </div> 
      </div> 
     </nav> 

     @yield('content') 

    </div> 

    <!-- Scripts --> 
    <script src="{{ asset('js/app.js') }}"></script> 
    <script src="js/jquery.min.js"></script> 
    <!-- jQuery Easing --> 
    <script src="js/jquery.easing.1.3.js"></script> 
    <!-- Bootstrap --> 

    <!-- Carousel --> 
    <script src="js/owl.carousel.min.js"></script> 
    <!-- Stellar --> 
    <script src="js/jquery.stellar.min.js"></script> 
    <!-- Waypoints --> 
    <script src="js/jquery.waypoints.min.js"></script> 
    <!-- Counters --> 
    <script src="js/jquery.countTo.js"></script> 


    <!-- MAIN JS --> 
    <script src="js/main.js"></script> 
</body> 
</html> 
+0

보기를 표시 할 수 있습니까? –

+0

@BenjaminBrasseur done –

+0

문제는 'layouts/app.blade.php'에서 발생한다고 생각합니다. 그것을 너무 보여줄 수 있습니까? –

답변

1

는 CSS 태그를 연결 이보기 페이지입니다. 사실

당신은 그런 다음

<link rel="stylesheet" type="text/css" href="css/style1.css"> 
<link rel="shortcut icon" href="favicon.ico"> 

<link href='https://fonts.googleapis.com/css?family=Roboto:400,300,600,400italic,700' rel='stylesheet' type='text/css'> 

<!-- Animate.css --> 
<link rel="stylesheet" href="css/animate.css"> 
<!-- Icomoon Icon Fonts--> 
<link rel="stylesheet" href="css/icomoon.css"> 
<!-- Bootstrap --> 
<link rel="stylesheet" href="css/bootstrap.css"> 
<!-- Owl Carousel --> 
<link rel="stylesheet" href="css/owl.carousel.min.css"> 
<link rel="stylesheet" href="css/owl.theme.default.min.css"> 
<!-- Theme style --> 
<link rel="stylesheet" href="css/style.css"> 

<!-- Modernizr JS --> 
<script src="js/modernizr-2.6.2.min.js"></script> 

당신이 /{party_id} 경로를 사용할 때, 브라우저 솔루션은 당신이에서 볼 수있는 것처럼 asset()을 사용하는 것입니다 localhost/{party_id}/css/style.css 대신 localhost/css/style.css

으로 찾아보십시오 귀하의 레이아웃보기의 상단<link href="{{ asset('css/app.css') }}" rel="stylesheet">

그래서 그런 것 :

<link rel="stylesheet" type="text/css" href="{{ asset('css/style1.css') }}"> 
<link rel="shortcut icon" href="{{ asset('favicon.ico') }}"> 

<link href='https://fonts.googleapis.com/css?family=Roboto:400,300,600,400italic,700' rel='stylesheet' type='text/css'> 


<!-- Animate.css --> 
<link rel="stylesheet" href="{{ asset('css/animate.css') }}"> 
<!-- Icomoon Icon Fonts--> 
<link rel="stylesheet" href="{{ asset('css/icomoon.css') }}"> 
<!-- Bootstrap --> 
<link rel="stylesheet" href="{{ asset('css/bootstrap.css') }}"> 
<!-- Owl Carousel --> 
<link rel="stylesheet" href="{{ asset('css/owl.carousel.min.css') }}"> 
<link rel="stylesheet" href="{{ asset('css/owl.theme.default.min.css') }}"> 
<!-- Theme style --> 
<link rel="stylesheet" href="{{ asset('css/style.css') }}"> 

<!-- Modernizr JS --> 
<script src="{{ asset('js/modernizr-2.6.2.min.js') }}"></script> 
+0

고마워요 !!!! –

관련 문제