Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Laravel 5.0 Giving Alias in routing

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 239
    Comment on it

    In route in laravel we can create alias for a url. Laravel provide us the facility for giving alias for an url. We can use this url alias any where in our view

    routes.php

    Route::get("admin/department/{id}", ['as' => 'department.edit', 'uses' => 'Admin\CompanyDepartmentsController@edit']);
    

    View code :-

    <a href="{{route('employee.edit', $value->userid)}}" style="padding-left:10px;">{!!Html::image('images/edit.png')!!}
    </a>
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: