0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Disable updating updated_at from Laravel Admin

Posted at

Summary

If you'd like to stop updating updated_at column from Laravel Admin page, You can code like this

$form->model()->timestamps = false;

Usage

app/Admin/Controllers/SomeController.php

    /**
     * Make a form builder.
     *
     * @return Form
     */
    protected function form()
    {

        ...

        $form->saving(function (Form $form) {
 
            $form->model()->timestamps = false;

        });
 
        return $form;
    }
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?