芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/reginaeigbe.com/folder/admin/tmp/resources/js/Admin/Pages/Testimonials/Create.jsx
import AdminLayouts from "@/Admin/Layouts/AdminLayouts"; import { Head, useForm } from "@inertiajs/react"; import TextInput from "@/Admin/Components/Inputs/TextInput"; import FileUpload from "@/Admin/Components/Inputs/FileUpload"; export default function Create() { const { data, setData, errors, post, processing } = useForm({ client_image: null, client_name: "", client_designation: "", rating: "", description: "", }); // handle submit const handleSubmit = (e) => { e.preventDefault(); post(route("admin.testimonials.store")); }; return (
Create testimonial
Testimonial details
Client image
setData("client_image", file) } /> {errors?.client_image && (
{errors.client_image}
)}
setData( "client_name", e.target.value ) } />
setData( "client_designation", e.target.value ) } />
setData( "rating", e.target.value ) } />
Review Description
setData( "description", e.target.value ) } ></textarea>
Submit
); }