I have a route that is meant to be a post request, and within the controller I want to know what values I send in the post request, I'm new to Laravel. How can I do this?
This is the code for my model:
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class OMeta extends Model
{
protected $fillable= ['n_bandera','h_entrada','h_salida','locacion','fecha','ticket','so'];
}
And I want to get the 'n_bandera'
attribute from the post request. How could I do it in the following controller function:
public function store(Request $request){
// get the 'n_bandera' attribute from the $request
}
Also, I don't want to use methods like all()
since I want the content from the request to go to different tables in a database.