G
G
GaserV2015-10-28 20:03:55
Laravel
GaserV, 2015-10-28 20:03:55

Why does laravel return "No properties"?

Tell. Why does it return "No properties" to me instead of the sent data?
c56ebb1e87e24548a1c3ed9c853ff063.png

<?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

2 answer(s)
J
javanub, 2015-10-28
@javanub

Maybe your form is not working? Check all fields. See what's coming. And add Request $request.

E
Evgeny Elchev, 2015-10-29
@rsi

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 question

Ask a Question

731 491 924 answers to any question