Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created July 15, 2020 17:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/066e9f831bdc1d708400944ccc6863bc to your computer and use it in GitHub Desktop.
Save parzibyte/066e9f831bdc1d708400944ccc6863bc to your computer and use it in GitHub Desktop.
<?php
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
(new Product($request->input()))->saveOrFail();
return redirect()->route("products.index")->with("message", __("messages.product_created"));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment