Giter VIP home page Giter VIP logo

Comments (7)

anlutro avatar anlutro commented on August 10, 2024

I don't think sentry has anything to do with it. When and how are you calling setExtraColumns?

from laravel-settings.

tanzhemeng avatar tanzhemeng commented on August 10, 2024

Hi anlutro,

I realized I have to place the setExtraColumns into service provider.

I have gotten this error "Illegal offset type in isset or empty" when I use this provider.

<?php namespace app\providers;

use Cartalyst\Sentry\Facades\Laravel\Sentry;
use Illuminate\Support\ServiceProvider;

class SettingsServiceProvider extends ServiceProvider {

    public function boot()
    {
        \Setting::setExtraColumns([
            'user_id' => Sentry::getUser()->id
        ]);
    }

    public function register()
    {
        //
    }

}

Is there any step which I have missed?

from laravel-settings.

anlutro avatar anlutro commented on August 10, 2024

Can you provide the full stacktrace?

from laravel-settings.

tanzhemeng avatar tanzhemeng commented on August 10, 2024

It's strange.

There is output on the browser when I do dd(Sentry::getUser()). It shows NULL on Command prompt.

stacktrace

from laravel-settings.

anlutro avatar anlutro commented on August 10, 2024

Can you check what Config::get('anlutro/l4-settings::store') is?

from laravel-settings.

tanzhemeng avatar tanzhemeng commented on August 10, 2024

It returns an empty array.

This is the content under app/config/packages/anlutro/l4-settings/config.php

return array(
    // which type of store to use.
    // valid options: 'json', 'database'
    'store' => 'database',

    // if the json store is used, give the full path to the .json file
    // that the store writes to.
    'path' => storage_path().'/settings.json',

    // if the database store is used, set the name of the table used..
    'table' => 'settings',

    // If the database store is used, you can set which connection to use. if
    // set to null, the default connection will be used.
    'connection' => null,
);

from laravel-settings.

anlutro avatar anlutro commented on August 10, 2024

It shouldn't return an empty array. I can't tell you why it does, though. Check that the configuration is in the right place, that you added the service provider etc.

from laravel-settings.

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.