DEV Community

Cover image for Form Example in Laravel 8

Form Example in Laravel 8

Sanajit Jana on September 12, 2021

Laravel 8 form example tutorial. In this post, i will teach from starting on how to send form data on controller and how to insert form data in dat...
Collapse
 
dahmoud20121 profile image
Dahmoud20121

thanks for your help

Collapse
 
sanajitjana profile image
Sanajit Jana

It's my pleasure

Collapse
 
prymov profile image
Arthur Prymov

thanks for help, but i have a error. why?
Error
Class 'App\Models\Post' not found

Collapse
 
sanajitjana profile image
Sanajit Jana

You have to create your model first
and do cross-check that, if you have given the right path or not

Collapse
 
patrice_desantacoloma_3 profile image
Coloma

Thank you for this sample code that works and is really useful.
Can you help push this further as in listing posts modifying deleting on the admin front and a user perspective?
I’m trying to develop a simple blog.
Thank you!

Collapse
 
codemaster4875 profile image
codemaster4875

I found the answer, add class into the routes\web.php and the problem was solved

use App\Http\Controllers\PostController;
Enter fullscreen mode Exit fullscreen mode
Collapse
 
brlovanshi profile image
Brajesh Lovanshi

Great work man

Collapse
 
codemaster4875 profile image
codemaster4875 • Edited

Hello, thanks for the example, but I followed the tutorial and it gave an error:

Target class [PostController] does not exist.

Collapse
 
euripedesroo profile image
Euripedes • Edited

put
use App\Http\Controllers\PostController;

in your code web.php

Collapse
 
selva4244 profile image
SELVA KUMAR

thank you...

Collapse
 
ningningpah00 profile image
fifa🐼

thank you for the tutorial, it works well and help me to understand more how to use laravel framework.