PHP code example of laracrafts / laravel-geo-routes
1. Go to this page and download the library: Download laracrafts/laravel-geo-routes 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/ */
use LaraCrafts\GeoRoutes\Support\Facades\CallbackRegistrar;
public function boot()
{
CallbackRegistrar::parseCallbacks(MyCallbacksClass::class);
}
use LaraCrafts\GeoRoutes\Support\Facades\CallbackRegistrar;
public function boot()
{
$myCallbacksArray = [
'handyName' => 'myClass::myCallback'
//
]
CallbackRegistrar::loadCallbacks($myCallbacksArray);
}
use LaraCrafts\GeoRoutes\Support\Facades\CallbackRegistrar;
public function boot()
{
CallbackRegistrar::callback('foo', function () {
return 'Sorry, you are not authorized.';
});
}