Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Histories package does not Work Please help #17

Closed
mwangaben opened this issue Jun 12, 2021 · 2 comments
Closed

Histories package does not Work Please help #17

mwangaben opened this issue Jun 12, 2021 · 2 comments

Comments

@mwangaben
Copy link

mwangaben commented Jun 12, 2021

I am using Macos Mojave
-- PHP 8.0.7
-- Laravel Framework 8.46.0

$post = Post::factory()->create();

    $post->title = 'Hello world';
    $post->save();

    dd($post->histories);

returns empty array
expect result is the past and current data of the model, kindly tell me if i am wrong somewhere

@seancheung
Copy link
Owner

Did you implement required traits to your model?

@smpita
Copy link

smpita commented Oct 6, 2021

I was having a similar issue. The problem turned out to be that I was doing my testing with Tinker and it wasn't clear to me that console_enabled in the history.php config file also controlled history logging while in tinker.

Maybe update the language in the config from When application is running in console(include seeding) to When application is running in console(include seeding/tinker)

@seancheung seancheung closed this as not planned Won't fix, can't repro, duplicate, stale Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants