我目前正在用Laravel 5开发一个应用程序,突然间工匠停止工作!
我不能在它上面使用单个命令,它总是返回错误:
[Symfony\Component\Debug\Exception\FatalErrorException]
syntax error, unexpected ',', expecting variable (T_VARIABLE)
Run Code Online (Sandbox Code Playgroud)
我试图通过作曲家更新,但当工匠试图清除complie
Command: composer update
> php artisan clear-compiled
[Symfony\Component\Debug\Exception\FatalErrorException]
syntax error, unexpected ',', expecting variable (T_VARIABLE)
Run Code Online (Sandbox Code Playgroud)
有没有人曾经有这个错误?
我的Php版本是5.6.8
我是Laravel的新手,在子目录方面遇到了麻烦.我想在controllers文件夹中创建一个admin文件夹,到目前为止它正在运行.但是当我尝试使用Laravel的Input类时,它说它无法找到它.
我的路线:
Route::group(array('prefix'=> 'admin', 'before' => 'auth.admin'), function() {
Route::resource('/users','Admin\\UsersController');
Route::resource('/products','Admin\\ProductsController');
Route::resource('/categories','Admin\\CategoriesController');
Route::resource('/orders','Admin\\OrdersController');
Route::resource('/reviews','Admin\\ReviewsController');
});
Run Code Online (Sandbox Code Playgroud)
产品控制器:
<?php namespace admin;
class ProductsController extends \BaseController {
protected $layout = 'master';
/**
* Instantiate a new ProductsController instance.
*/
public function __construct()
{
$this->beforeFilter('auth.admin');
}
/**
* Display a listing of the resource.
* GET /products
*
* @return Response
*/
public function index()
{
$input = Input::all(); //here is where it finds the error
Run Code Online (Sandbox Code Playgroud)
而composer.json自动加载:
"autoload": {
"classmap": [
"app/commands",
"app/controllers/",
"app/models", …Run Code Online (Sandbox Code Playgroud)