public function log($description = '')
    {
        $payload = [
            'user_id' => auth()->id(),
            'description' => $description,
            'request' => json_encode([
                'url' => request()->url(),
                'method' => request()->method(),
                'query' => request()->fullUrl(),
                'secure' => request()->secure(),
                'client_ip' => request()->ip(),
                'payload' => request()->all(),
            ]),
        ];

        return $this->model->create($payload);
    }
public function log($description = '')
    {
        $payload = [
            'user_id' => auth()->id(),
            'description' => $description,
            'request' => json_encode([
                'url' => request()->url(),
                'method' => request()->method(),
                'query' => request()->fullUrl(),
                'secure' => request()->secure(),
                'client_ip' => request()->ip(),
                'payload' => request()->all(),
            ]),
        ];

        return $this->model->create($payload);
    }
public function log ( $ description = '' ) { $ payload = [ 'user_id' => auth ( ) -> id ( ) , 'description' => $ description , 'request' => json_encode ( [ 'url' => request ( ) -> url ( ) , 'method' => request ( ) -> method ( ) , 'query' => request ( ) -> fullUrl ( ) , 'secure' => request ( ) -> secure ( ) , 'client_ip' => request ( ) -> ip ( ) , 'payload' => request ( ) -> all ( ) , ] ) , ] ; return $ this -> model -> create ( $ payload ) ; }
Create an activity record

@param  string $description
@return  Activity
Create an activity record