mardi 6 novembre 2018

root folder redirection issue in laravel

I'm using wamp server for laravel. my url is localhost/pjct_name/public. I have the url in ajax as given below

$.ajax({
        type: "POST",
        dataType: 'json',
        url : "../getCustomer",
        ...  
       });

Its working for edit but not request

Route::get('/request', [ 
        'middleware' => 'roles',
        'roles' => [ 
                'Requestor' 
        ],   
        function(){return View('layouts.request');}
]);
/*Edit request*/
Route::get('/edit/{id}',array('as'=>'edit','middleware' => 'checksession',
        function($id){
        $data['id'] =$id;
        return View::make('layouts.request',$data);
    })
);

in request page redirect to http://localhost/asset/getCustomer but I need to redirect as http://localhost/asset/public/getCustomer how to write htaccess for redirection. I have tried as

 RewriteEngine On
 RewriteRule ^$ /public [L] 

but no luck



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire