model的all静态方法 会让 pa serve 直接退出?

在看实现简单Blog展示[https://www.laravist.com/series/laravel-5-basic/episodes/8],在实验到01:48处,只要执行App\Article::all() 发现进程直接退出。
请问在5.4版本model的all是有问题的?还会让php进程直接退出?

表现在页面上的效果像下面这样(服务器居然连头部都没有返回):
The localhost page isn’t working

localhost didn’t send any data.
ERR_EMPTY_RESPONSE

下面用tinker测试:

Psy Shell v0.8.8 (PHP 7.1.4cli) by Justin Hileman
>>> App\Article::all();
➜  larvael 

但下面的语句却可以:

>>> App\Article::find(1);
=> App\Article {#686
     id: 1,
     title: "my First Title",
     content: "my First Content",
     published_at: "2017-07-04 07:28:08",
     created_at: "2017-07-04 07:28:34",
     updated_at: "2017-07-04 07:28:34",
   }
>>> 

我看到官网上的文档也支持App\Flight::all(); all[http://d.laravel-china.org/docs/5.4/eloquent#取回多个模型]方法的,其它的同学是否也有这个问题?

controller和model通过下面语句创建:

pa make:controller ArticlesController --model=Article

➜  larvael cat app/Http/Controllers/ArticlesController.php
<?php

namespace App\Http\Controllers;

use App\Article;
use Illuminate\Http\Request;

class ArticlesController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        //
        return Article::all();
    }
....
➜  larvael cat app/Article.php
<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Article extends Model
{
    //
    protected $table = "articles";
}

希望大家交流交流..

JellyBool

我试了一下,laravel 在我这边没有这个问题。

看看你的哪里的配置问题吧

嗨段段 回复 JellyBool

OK,我再试一试,谢谢啦 。

嗨段段

1: workspace composer create-project laravel/laravel test
2: pa make:controller ArticlesController --model=Article
3: vi .env for database configure
4: pa make:controller ArticlesController --model=Article
5: pa serve
6: pa tinker
6: >>> App\Article::all() —> 直接退出!!!!
7: App\Article::find(1)
7: App\Article {#685 id: xxx, title: xxx }

配置composer.json:

    "require": {
        "php": ">=5.6.4",
        "laravel/framework": "5.4.*",
        "laravel/tinker": "~1.0"
    },

问题就在第六步,想不通啊。

嗨段段

忽略第二步
@JellyBool

JellyBool 回复 嗨段段

我也想不通啊,没遇到过,只能告诉你我这边正常,也是 laravel 5.4 :

Psy Shell v0.8.8 (PHP 7.0.8-2+deb.sury.org~xenial+1 — cli) by Justin Hileman
>>> App\Series::all()
=> Illuminate\Database\Eloquent\Collection {#1051
     all: [
       App\Series {#1052
         id: 1,
         title: "Laravist Help Videos",
         intro: "Laravist 官方录制的一些视频,包括一些片头,片尾和一些形象宣传(如果有的话)什么的",
         created_at: "2015-09-07 15:52:52",
         updated_at: "2016-06-06 00:30:06",
         slug: "laravist-official-videos-series",