PHP code example of bpocallaghan / locations

1. Go to this page and download the library: Download bpocallaghan/locations 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/ */

    

bpocallaghan / locations example snippets

bash
Route::group(['prefix' => 'general/locations', 'namespace' => 'Locations\Controllers\Admin'], function () {
    Route::resource('suburbs', 'SuburbsController');
    Route::resource('cities', 'CitiesController');
    Route::resource('provinces', 'ProvincesController');
    Route::resource('countries', 'CountriesController');
});
bash
php artisan locations:publish
bash
php artisan locations:publish --files=all
bash
Route::group(['prefix' => 'locations', 'namespace' => 'Locations'], function () {
    Route::resource('suburbs', 'SuburbsController');
    Route::resource('cities', 'CitiesController');
    Route::resource('provinces', 'ProvincesController');
    Route::resource('countries', 'CountriesController');
});