Laravel-文件意外结束


Laravel - unexpected end of file

当通过本地服务器加载Laravel时,我收到一个"意外的文件结尾错误"。在我的路线上我有:

    <?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::post('/item/create', ['as' => 'item.store', 'uses' => 'ItemController@store']);
Route::resource('item', 'ItemController');
Route::get('/', function() {
    return view('welcome');
});
Route::auth();

Route::get('/home', 'HomeController@index');
Route::post('/item', 'ItemController@store');
Route::get('/item', 'ItemController@index');
Route::get('/item/{id}', 'ItemController@show');

Route::group(['middleware' => ['web']], function(){
    Route::get('/addItem/{productID}', 'CartController@addItem');
    Route::get('/removeItem/{productID}', 'CartController@removeItem');
    Route::get('/checkout', function() {
        return view('cart.checkout');
    });
    Route::post('/create_payment', function(){
// Set your secret key: remember to change this to your live secret key in production
// See your keys here https://dashboard.stripe.com/account/apikeys
        'Stripe'Stripe::setApiKey("sk_test_VVSBY8xjNklioi7V0yFVfx6Q");
        $receiver = 'Stripe'BitcoinReceiver::create(array(
            "amount" => 1000,    // amount in cents
            "currency" => "usd", // presently can only be USD
            "email" => "payinguser+fill_now@example.com"
        ));
        $charge = 'Stripe'Charge::create(array(
            "amount" => $receiver->amount,
            "currency" => $receiver->currency,
            "source" => $receiver->id,
            "description" => "Example charge"
        ));
    });
Route::get('/logout', 'Auth'AuthController@getLogout');
// Registration routes...
Route::get('/register', 'Auth'AuthController@getRegister');
Route::post('/register', 'Auth'AuthController@postRegister');
});

//Route

在我的欢迎模板中,我有这样的:

@extends('layouts.app')
@section('content')
<div class="container">
    <div class="row">
        <div class="col-md-10 col-md-offset-1">
            <div class="panel panel-default">
                <div class="panel-heading">Welcome</div>
                <div class="panel-body">
                    Your Application's Landing Page.
                </div>
            </div>
        </div>
    </div>
</div>
@endsection

Laravel报告了一个意外的文件结尾错误。我不明白为什么会发生这种事。据我所知,我的刀片文件是准确的,但由于某种原因,它不会呈现欢迎页面。

我解决了这个问题。我想用@extends('add')代替layout.app。现在一切都正常了。