laravel-resourceful icon indicating copy to clipboard operation
laravel-resourceful copied to clipboard

Does it still work?

Open LunarDevelopment opened this issue 6 years ago • 0 comments

With a fresh laravel 5.5 and php 7.1; if I run:

$ php artisan make:resource news
Resource created successfully.

The only file produced is a App\Http\Resources\task.php and no other files, routes etc , am I missing something?

<?php

namespace App\Http\Resources;

use Illuminate\Http\Resources\Json\ResourceCollection;

class task extends ResourceCollection
{
    /**
     * Transform the resource collection into an array.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function toArray($request)
    {
        return parent::toArray($request);
    }
}

LunarDevelopment avatar Jan 26 '18 10:01 LunarDevelopment