Answer the question
In order to leave comments, you need to log in
Why does laravel return "No properties"?
Tell. Why does it return "No properties" to me instead of the sent data?
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Response;
use App\Http\Controllers\Controller;
use Request;
use App\User;
use App\AddNews;
use App\Comment;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Crypt;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\DB;
use Illuminate\Database\Eloquent\ModelNotFoundException;
class MainController extends Controller
{
public function newrecord()
{
$formdata = Request::all();
return $formdata;
}
}
Answer the question
In order to leave comments, you need to log in
Maybe your form is not working? Check all fields. See what's coming. And add Request $request.
So it works fine, returns the fields from the request to you, but they are not there, an empty array, you look in the developer tools not only what comes from the server, but what goes there
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question