Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public function store (Request $ request)
    {
        $ detail = $ request-> summernoteInput;
        $ summernote = new Summernote;
        $ summernote-> title = $ request-> input ('title');
        $ summernote-> subtitle = $ request-> input ('subtitle');
        if ($ file = $ request-> hasFile ('imagePost')) {
            $ file = $ request-> file ('imagePost');
            $ fileName = time (). '-'. $ file-> getClientOriginalName ();
            $ destinationPath = public_path (). '/ upload / post_blog';
            $ file-> move ($ destinationPath, $ fileName);
            $ summernote-> imagePost = $ fileName;
        }
        $ summernote-> content = $ detail;
        $ summernote-> save ();
        Session :: flash ('flash_message', 'Success!', 'Close');
        return redirect () -> route ('admin / posts / show');
    }
@oukha

This comment has been minimized.

Copy link

oukha commented Jan 7, 2019

[_****_](

@1. url

)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.