public function index() { return TypeModel::all()->toJson(); }
/** * All types * * @return \Illuminate\Database\Eloquent\Collection */ public function all() { return TypeModel::all(); }
public function test_it_fetches_all_the_types_in_collection() { $types_collection = (new Type())->all(); $this->assertInstanceOf('Illuminate\\Database\\Eloquent\\Collection', $types_collection); $this->assertEquals($types_collection->count(), TypeModel::all()->count()); }