classes/Controllers/Elements.php
public function fieldUpdate($key)
    {
        $elements = app('decoy.elements')->localize(Decoy::locale());

        // If the value has changed, update or an insert a record in the database.
        $el = Decoy::el($key);
        $value = request('value');
        if ($value != $el->value || Request::hasFile('value')) {

            // Making use of the model's exists property to trigger Laravel's
            // internal logic.
            $el->exists = $elements->keyUpdated($el->key);

            // Save it.  Files will be automatically attached via model callbacks
            $el->value = $value;
            $el->locale = Decoy::locale();
            $el->save();

            // Clear the cache
            $elements->clearCache();
        }

        // Return the layout with JUST a script variable with the element value
        // after saving.  Thus, post any saving callback operations.
        return View::make('decoy::layouts.blank', [
            'content' => "<div id='response' data-key='{$key}'>{$el}</div>"
        ]);
    }
public function fieldUpdate($key)
    {
        $elements = app('decoy.elements')->localize(Decoy::locale());

        // If the value has changed, update or an insert a record in the database.
        $el = Decoy::el($key);
        $value = request('value');
        if ($value != $el->value || Request::hasFile('value')) {

            // Making use of the model's exists property to trigger Laravel's
            // internal logic.
            $el->exists = $elements->keyUpdated($el->key);

            // Save it.  Files will be automatically attached via model callbacks
            $el->value = $value;
            $el->locale = Decoy::locale();
            $el->save();

            // Clear the cache
            $elements->clearCache();
        }

        // Return the layout with JUST a script variable with the element value
        // after saving.  Thus, post any saving callback operations.
        return View::make('decoy::layouts.blank', [
            'content' => "<div id='response' data-key='{$key}'>{$el}</div>"
        ]);
    }
public function fieldUpdate ( $ key ) { $ elements = app ( 'decoy.elements' ) -> localize ( Decoy :: locale ( ) ) ; // If the value has changed, update or an insert a record in the database. $ el = Decoy :: el ( $ key ) ; $ value = request ( 'value' ) ; if ( $ value != $ el -> value || Request :: hasFile ( 'value' ) ) { // Making use of the model's exists property to trigger Laravel's // internal logic. $ el -> exists = $ elements -> keyUpdated ( $ el -> key ) ; // Save it.  Files will be automatically attached via model callbacks $ el -> value = $ value ; $ el -> locale = Decoy :: locale ( ) ; $ el -> save ( ) ; // Clear the cache $ elements -> clearCache ( ) ; } // Return the layout with JUST a script variable with the element value // after saving.  Thus, post any saving callback operations. return View :: make ( 'decoy::layouts.blank' , [ 'content' => "<div id='response' data-key='{$key}'>{$el}</div>" ] ) ; }
Update a single field because of a frontend Element editor
iframe post

@param  string                   $key A full Element key
@return Illuminate\Http\Response
Update a single field because of a frontend Element editor iframe post