Saturday, March 4, 2017

Laravel Route Parameters change public_path

    #1 public/    
    Route::get('/foo', function(){ return view('foo'); });

    #2(this change all public_path to public/bar/)
    Route::get('/bar/{id}', 'BarController@bar'); 

    its nice and clean in my blade        
    <script type="text/javascript" src="vendor/jquery/jquery-3.1.1.min.js"></script>
    <img src="images/foo.jpg">

I have a problem when I add route parameter, it change my public_path in blade

I don't want to add public_path() in my blade which is not nice and clean, anyone know how to solve this problem?



via Benjamin W

Advertisement