public function update(Request $request)
    {
        $key = $request->get('key');
        $type = $request->get('type');

        /** @var DataType $class */
        $class = $this->{$type}();

        $class->update($request->all());

        $class->setTtl($key, $request->get('ttl'));
    }
public function update(Request $request)
    {
        $key = $request->get('key');
        $type = $request->get('type');

        /** @var DataType $class */
        $class = $this->{$type}();

        $class->update($request->all());

        $class->setTtl($key, $request->get('ttl'));
    }
public function update ( Request $ request ) { $ key = $ request -> get ( 'key' ) ; $ type = $ request -> get ( 'type' ) ; /** @var DataType $class */ $ class = $ this -> { $ type } ( ) ; $ class -> update ( $ request -> all ( ) ) ; $ class -> setTtl ( $ key , $ request -> get ( 'ttl' ) ) ; }
Update a specified key.

@param Request $request

@return bool
Update a specified key .