PHP code example of coopbelvedere / laravel-localized-url

1. Go to this page and download the library: Download coopbelvedere/laravel-localized-url library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

coopbelvedere / laravel-localized-url example snippets


use Belvedere\LocalizedUrl\LocalizedUrlFacade as LocalizedUrl;

class RouteServiceProvider extends ServiceProvider
{

...

    protected function mapWebRoutes()
    {
        Route::middleware('web')
             ->namespace($this->namespace)
             ->prefix(LocalizedUrl::urlPrefix())
             ->group(base_path('routes/web.php'));
    }

php artisan vendor:publish --provider="Belvedere\LocalizedUrl\LocalizedUrlServiceProvider"