Giter VIP home page Giter VIP logo

Comments (10)

Omranic avatar Omranic commented on September 25, 2024

Did you create & execute a migration for your Poll model? If no, please do so. This is related to your Poll model, not this package. For more info check:

https://laravel.com/docs/8.x/migrations

https://laravel.com/docs/8.x/eloquent

from laravel-attributes.

kis60 avatar kis60 commented on September 25, 2024

Did you create & execute a migration for your Polls model?

Yes, I did. But, while doing
$p = Poll::where('link', 'AAA')->first();
("Rinvex Attributes tries to do everything in the same way Eloquent would normally do" !) I got QueryException "Column not found: 1054 Unknown column 'link' in 'where clause'". What's wrong?

from laravel-attributes.

Omranic avatar Omranic commented on September 25, 2024

Can you execute the following code and tell me what's the output:
app('rinvex.attributes.attribute')->where('slug', 'link')->get();

Also can you confirm what's your fully qualified Poll model namespace.

from laravel-attributes.

kis60 avatar kis60 commented on September 25, 2024

from laravel-attributes.

vahidalvandi avatar vahidalvandi commented on September 25, 2024

I was a little confused
Why should the Product table be created and according to the document, when I want to create a custom attribute price, it gives an error that the price column is not available !!!

from laravel-attributes.

Omranic avatar Omranic commented on September 25, 2024

@vahidalvandi What product table? 🙂

from laravel-attributes.

vahidalvandi avatar vahidalvandi commented on September 25, 2024

hi @Omranic product table in https://github.com/rinvex/laravel-attributes#assigning-values and according @kis60 poll table . please show a demo

from laravel-attributes.

Omranic avatar Omranic commented on September 25, 2024

This is just an example, you need to create that table yourself. That example could be Product or Article or anything else, that's your business logic and not within the scope of this package to cover.

from laravel-attributes.

vahidalvandi avatar vahidalvandi commented on September 25, 2024

i need this senario do it work ?

i have lead table with three columns (id , name , lname) . i want admin can add multi cloumn like mobile , email without change table .

from laravel-attributes.

Omranic avatar Omranic commented on September 25, 2024

Yes it works, but you can achieve that through different ways. You can use this EAV package, or use a more simple approach the get the job done as well https://github.com/spatie/laravel-schemaless-attributes

That's why I mentioned previously if you don't know EAV and want that model specifically, you probably don't need it at all, and probably there's a better more simple solution to solve your challenge.

from laravel-attributes.

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.