Giter Site home page Giter Site logo

laravel-meta's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

laravel-meta's Issues

Add float data type

Feature request

Hi! Thank you for this awesome package, it's really useful.
It'd be great if you could add support for the float data type.
Thank you

Permissions

Hiya

Well done for creating a great package.

I was wondering if there is a way to be able to store permissions against a meta key?

What I need to be able to do is store which users/teams (using Jetstream) can read, edit, delete the metatag.

Then some way link that to Laravels search so that only those users/teams with read permission see results in the search.

Thanks for any help you can provide.

Do you plan on making a paid version with extra features?

Cheers

Nathan

How to use whereMetaHas in pivot table

Hi there, firstly, thanks for this great package, I love it, it's working great so far.
However, I have some issues when using it in a pivot table.

I use meta in a pivot table where I store some user data related to the organization he belongs to.

I'm unable to query a user based on a meta stored in this pivot table.

Example:
I want to get all users that has a specific meta (e.g. account_id) inside the pivot table. Any ideas on how I can achieve this?

How to WhereMetaJsonContains in Package

Hi,
When Use Collection or array type for meta, how to query in Builder?

1234

when create attachment meta , how to query when we want all projectt tha has attachment with 3 or 5?

\App\Models\Project::whereMetaIn('attachment', ['3' , '5'])->get();

This Code Not Work?
Please Help

Laravel v10.x supports

I prefer this package to the others and tried to use it on Laravel v.10.x but the installation failed due to:

Problem 1
    - zoha/laravel-meta[v1.1, ..., v1.5] require illuminate/support ^5.6 -> found illuminate/support[v5.6.0, ..., v5.8.36] but these were not loaded, likely because it conflicts with another require.
    - zoha/laravel-meta v1.6 requires illuminate/support ^5.8 -> found illuminate/support[v5.8.0, ..., v5.8.36] but these were not loaded, likely because it conflicts with another require.
    - zoha/laravel-meta 1.6.1 requires illuminate/support ^5.8|^6.0 -> found illuminate/support[v5.8.0, ..., v5.8.36, v6.0.0, ..., v6.20.44] but these were not loaded, likely because it conflicts with another require.
    - zoha/laravel-meta 1.7 requires illuminate/support ^5.8|^6.0|^7.0 -> found illuminate/support[v5.8.0, ..., v5.8.36, v6.0.0, 
..., v6.20.44, v7.0.0, ..., v7.30.6] but these were not loaded, likely because it conflicts with another require.
    - zoha/laravel-meta[1.8, ..., v1.9] require illuminate/support ^5.8|^6.0|^7.0|^8.0 -> found illuminate/support[v5.8.0, ..., v5.8.36, v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27] but these were not loaded, likely because it conflicts with another require.
    - zoha/laravel-meta v2.0.0 requires laravel/framework ^8.0|^9.0 -> found laravel/framework[v8.0.0, ..., v8.83.27, v9.0.0, ..., v9.52.4] but it conflicts with your root composer.json require (^10.0).
    - Root composer.json requires zoha/laravel-meta * -> satisfiable by zoha/laravel-meta[v1.1, ..., v1.9, v2.0.0].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific 
versions.

Thanks.

composer.json has the wrong source key

When I installed on a production environment, it installed version 1.1. Seemed to work locally but the files in my vendor folder on the server were very outdated.

Soft Deletes in laravel-meta

First off thank you so much for this wonderful package. Its a life saver coming from the wordpress world. Im wondering what would be the proper way to handle soft deletes ?

Temporary loaded meta not correct if event observer returns false

Hi, firstly to say thank you for this package, it is great.

I have been working on adding an approval workflow to an application that uses this package and I can listen to creating/updating events correctly and can intercept/block the create/update of metadata if conditions are not met, however it appears the package utilises temporary cached data against the model that updates with newly passed data even though the database record is not updated.

For example, if I create an observer and listen for the ::updating event on the Zoha\Meta\Models\Meta model and get it to return false, if I already have a meta value for key "updated_time" as (for example) "1641464807" then call something like the below:

$user = \Auth::user();
$user->setMeta('updated_time',time());
ddd($user->getMeta('updated_time'));

it will dump the latest time even though the meta database record does now get updated.

It appears that in SetMetaHelper.php you save the meta (in both executeUpdateMeta() and executeCreateMeta()) but do not check to see whether the data was actually saved or not before setting the value of the temporary loaded meta items.

Would it be possible to tweak the code to check to see if the save was completed successfully or not and update the temporary meta items cache accordingly? It may also be useful to then return false from UpdateMetaHelper::updateMeta and CreateMetaHelper::createMeta if the executions do not get saved due to events blocking them?

use of multiple tables in one model

protected $metaTable = ['posts_field','posts_detail_field'];

For example, is it possible to use 2 tables as post_field and post_detail in the Post model?

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.