Skip to content

Commit

Permalink
Ajustes
Browse files Browse the repository at this point in the history
  • Loading branch information
Thasso Araújo committed Jun 17, 2020
1 parent 5960a6c commit 5984321
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions app/Http/Controllers/Api/FreteController.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ public function destroy($id)
public function calcular(CalcularFreteRequest $request)
{
try {
\Log::info($request->input());
$data = $request->only([
"distancia",
"tipo_veiculo"
Expand Down Expand Up @@ -162,6 +163,7 @@ public function calcular(CalcularFreteRequest $request)
public function agendar(AgendarFreteRequest $request)
{
try {
\Log::info($request->input());
$user = auth('api')->user();

$data = $request->only([
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Requests/Api/CalcularFreteRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ public function authorize()
public function rules()
{
return [
"distancia" => 'required',
"tipo_veiculo" => 'required',
// "distancia" => 'required',
// "tipo_veiculo" => 'required',
];
}
}
2 changes: 1 addition & 1 deletion routes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
});

Route::group([
'middleware' => 'api',
// 'middleware' => 'api',
'prefix' => 'fretes'
], function ($router) {
Route::get('/', 'Api\FreteController@index');
Expand Down

0 comments on commit 5984321

Please sign in to comment.