每当我尝试在路线上指定变量时,网页都会失真

时间:2019-05-15 13:10:54

标签: laravel

我尝试通过路由解析变量,但是CSS没有显示在页面上,并且页面仅显示html =

这是我的网络路线;

Route::get('/create-transaction/{id}', 'AdminController@create')->name('Create Transaction');

这是我的控制器;

public function create($id){
        $users = User::orderBy('id', 'desc')->paginate(100);
        return view('create-transaction')->with(compact('users', 'id'));

    }

我的网站上其他所有网页均出现此sam错误。一旦我通过路由解析了一个变量,整个页面就失去了格式。我试过在不解析变量的情况下使用同一页面,但效果很好,但是在解析变量时情况却不同

这是我的查看页面;

@extends('layouts.admin')
@section('content')
<section class="content-top-margin page-title-small border-bottom-light border-top-light">
    <div class="container">
        <div class="row">
            <div class="col-md-6 col-sm-12 wow fadeInUp" data-wow-duration="300ms">
                <!-- page title -->
                <h1 class="black-text">Create Transaction</h1>
                <!-- end page title -->
            </div>
            <div class="col-md-6 col-sm-12 breadcrumb text-uppercase wow fadeInUp" data-wow-duration="600ms">
                <!-- breadcrumb -->
                <ul>
                    <li><a href="/admin-dashboard">Dashboard</a></li>
                    <li><a href="/deposit" class="active">Withdrawals</a></li>
                    <li><a href="/change-password">Change Password</a></li>
                </ul>
                <!-- end breadcrumb -->
            </div>
        </div>
    </div>
</section>
<section class="wow fadeIn border-top">
        <div class="container">
            <div class="row">
                <div class="col-md-5 col-sm-10 center-col">
                    @if (session('error'))
                        <div class="alert alert-danger">
                            {{ session('error') }}
                        </div>
                    @endif
                    @if (session('success'))
                        <div class="alert alert-success">
                            {{ session('success') }}
                        </div>
                    @endif
                    <form action="/create-transaction" method="POST">
                        @csrf
                        <div class="form-group">
                            <div class="col-md-6">
                                <label for="exampleInputEmail1">Date</label>
                                <input type="text" name="current-password" class="form-control input-round big-input" required>
                            </div>
                            <div class="col-md-6">
                                <label for="exampleInputEmail1">Amount</label>
                                <input type="text" name="current-password" class="form-control input-round big-input" required>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3">
                                <label for="exampleInputEmail1">Type</label>
                                <input type="text" name="current-password" class="form-control input-round big-input" required>
                            </div>
                            <div class="col-md-9">
                                <label for="exampleInputEmail1">Description</label>
                                <input type="text" name="current-password" class="form-control input-round big-input" required>
                            </div>
                        </div>
                        <button class="btn btn-black btn-small btn-round no-margin-bottom" type="submit">Create Transaction</button>
                        <!-- end button  -->
                    </form>
                </div>
            </div>
        </div>
    </section>
@endsection

0 个答案:

没有答案