Giter Club home page Giter Club logo

Comments (4)

MarcinOrlowski avatar MarcinOrlowski commented on June 22, 2024 1

Fixed in 3.0.2

from laravel-api-response-builder.

MarcinOrlowski avatar MarcinOrlowski commented on June 22, 2024 1

My point is that if your report the issue then even you worked it around on your side, you should let the ticket opened for me to investigate. And even if you'd find that it was your fault then you should rather state this in comment and let the maintainer do the rest. Anyway, this time it was my bug, so thanks for the report :)

from laravel-api-response-builder.

MarcinOrlowski avatar MarcinOrlowski commented on June 22, 2024

Not sure why you closed this - it's a bug in the getClassesMapping().

Quick solution is to check you config as "classes" mapping lacks either key or method entry for class. If you are upgrading from pre 3.0.0 dev code, then you need to ensure it looks like:

'classes' => [

	Illuminate\Database\Eloquent\Model::class => [
		'key'    => 'item',
		'method' => 'toArray',
	],
	Illuminate\Database\Eloquent\Collection::class => [
		'key'    => 'items',
		'method' => 'toArray',
	],
],

from laravel-api-response-builder.

dragonfire1119 avatar dragonfire1119 commented on June 22, 2024

@MarcinOrlowski I closed it because I looked at the github config & copied the

Illuminate\Database\Eloquent\Model::class => [
		'key'    => 'item',
		'method' => 'toArray',
	],
	Illuminate\Database\Eloquent\Collection::class => [
		'key'    => 'items',
		'method' => 'toArray',
	],

It started working again on the 3.0 so I didn't want to waste your time.

from laravel-api-response-builder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.