laravel difference of session::flash and request->session->flash

Viewed 1197

i wonder that what is the differences in performance and usage advantage ?

public function delete(){
    \Session::flash('success', __('common.message.success.delete'));
}

vs

public function delete(){
    $request->session()->flash('success', __('common.message.success.delete'))
}

please explain it with an open example. which one is the best performance provide and which one of the right way usage at session ?

1 Answers
Related