<?php

namespace BYDAuto\Actions;

use BYDAuto\Models\Testdrive;
use Illuminate\Http\Request;

class TestdriveCreateAction
{
    public function execute(Request $request)
    {
        $data = $request->all();
        $data['request_id'] = $request->request_id;
        return $this->createTestdrive($data);
    }

    public function createTestdrive($data)
    {
        $model = new Testdrive($data);
        $model->save();
        return $model;
    }
}
