Problem using Route :: resource on production server

1

I'm making a system using Laravel 5.6

Upload to a server I have and access it externally

But I'm having problems when the route uses resouce, for example:

Route::resource('materiais', 'MaterialController');

The routes that I created normal using Route::get , Route::post , Route::patch , etc., work correctly

For example if I'm in

http://192.168.0.23/sisobras/public/novaordem

and I'm going to open a new order he goes to the address

http://192.168.0.23/sisobras/public/ordemservico/2/create?

running correctly, the route looks like this:

Route::get('ordemservico/{id}/create', 'OrdemServicoController@create');

however if I am in

http://192.168.0.23/sisobras/public/materiais

and I'm going to register new material the url looks like this:

http://192.168.0.23/materiais/create

The calling function looks like this:

public function create()
{
    $unidades = Unidade::all();
    return view('materiais.create', compact('unidades'));
}

And the order of service like this:

public function create($id)
{
    if($id == 0){
        $setores_internos = SetorInterno::all();
        //$setores = Setor::where('setor_id', 5)->get();
        $meios = Meio::all();
        $bairros = Bairro::all();
        $servicos = CadastroServico::where('setor_id', 5)->get();
        date_default_timezone_set('America/Sao_Paulo');
        $data = date('d/m/Y H:i:s');

        return view('ordemservicos.create',compact('data','id','setores_internos','meios',$
    }else{

        $cidadao = Cidadao::find($id);
        $meios = Meio::all();
        $servicos = CadastroServico::whereNotIn('setor_id', [5])->get();
        $enderecos = Endereco::where('cidadao_id', $id)->get();
        $setores = Setor::whereNotIn('id', [5])->get();
        $horas_servico = ConvertTime::convertToTime($cidadao->horas_servico);
        date_default_timezone_set('America/Sao_Paulo');
        $data = date('d/m/Y H:i:s');

        return view('ordemservicos.create',compact('cidadao','meios','servicos','setores',$
    }
}

and by the lack of sisobras/public/ of an error of Not Found

When I use the system with php artisan serve running on the same machine everything works correctly

    
asked by anonymous 22.06.2018 / 21:32

0 answers