GithubHelp home page GithubHelp logo

Comments (6)

paligiannis avatar paligiannis commented on July 29, 2024

have you published the vendor?

from laravel-attributes.

dani7115 avatar dani7115 commented on July 29, 2024

Yes I did. Even I had doubt maybe I did something wrong. So I did this again 3 times from the start. But still wasn't able to fix this.

from laravel-attributes.

paligiannis avatar paligiannis commented on July 29, 2024

Please show the import statement on the top of the file

from laravel-attributes.

dani7115 avatar dani7115 commented on July 29, 2024

These are the imports for the controller that i'm using for testing


<?php

namespace App\Http\Controllers;
use App\Models\Company;
use App\Models\Product;
use Illuminate\Http\Request;

And these are for SERVICE APP PROVIDER

namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Rinvex\Attributes\Models\Attribute;

from laravel-attributes.

paligiannis avatar paligiannis commented on July 29, 2024

try to import them as

use \Rinvex\Attributes\Models\Type\Varchar as Varchar1

and then use it in your code

from laravel-attributes.

Omranic avatar Omranic commented on July 29, 2024

Sorry about that, I pushed a fix the docs. The correct code should be as follows:
$values = $attribute->values(\Rinvex\Attributes\Models\Type\Varchar::class)->get();

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.