I am studying Laravel 8 and trying to make a form validation and I want to know whether my $_POST
is right? Or is there a better way to do this or do I have problems with my code?
See my code below:
<?php
namespace App\Http\Controllers ;
use illuminate\Http\Request ;
class customers extends Controller {
public function getData (Request $request){
$name = $_POST['name']; // <--- is this right ?
}
}