Created
July 29, 2020 21:02
-
-
Save DarkGhostHunter/2e493a85ab0d56729980718a08f82f4a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use App\Template; | |
class TemplateController extends Controller | |
{ | |
/** | |
* Create a new contract. | |
* | |
* @param \Illuminate\Http\Request $request | |
* @return \App\Template | |
*/ | |
public function create(Requets $request) | |
{ | |
return Template::create($request->validate([ | |
'text' => 'required|string', | |
'variables' => 'required|json', | |
'variables.*' => 'required|string' | |
]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment