mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 14:06:15 +00:00
#591 - scripts
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
|
||||
use App\Models\Script;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
|
||||
class CreateScript
|
||||
{
|
||||
@ -12,6 +13,8 @@ class CreateScript
|
||||
*/
|
||||
public function create(User $user, array $input): Script
|
||||
{
|
||||
Validator::make($input, self::rules())->validate();
|
||||
|
||||
$script = new Script([
|
||||
'user_id' => $user->id,
|
||||
'name' => $input['name'],
|
||||
|
Reference in New Issue
Block a user