Coder Social home page Coder Social logo

Comments (4)

belamov avatar belamov commented on May 30, 2024

im not the only one who has this issue, see #13

from laravel-favorite.

belamov avatar belamov commented on May 30, 2024

ok so I found out those code in eloquent:

// If the model has an incrementing key, we can use the "insertGetId" method on
// the query builder, which will give us back the final inserted ID for this
// table from the database. Not all tables have to be incrementing though.
$attributes = $this->getAttributes();

if ($this->getIncrementing()) {
    $this->insertAndSetId($query, $attributes);
}

seems like we need to add this code to Favorite model

public function getIncrementing()
{
    return null;
}

ill add pr shortly

from laravel-favorite.

BaraaDev avatar BaraaDev commented on May 30, 2024

App\Models\Course::isFavorited must return a relationship instance. (View: E:\laragon\www\Courses\resources\views\admin\courses\show.blade.php)

What is the solution to this error?

from laravel-favorite.

mdbtekny avatar mdbtekny commented on May 30, 2024

Hey, have you resolved your problem?

from laravel-favorite.

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.