laravel-5.8smartystreets

How to integrate smartystreet with laravel


I want to integrated smartystreets with my laravel project but am not able to do so.

I have tried this link , but it throw me error "Undefined constant 'FireEngineRed\SmartyStreetsLaravel\SmartyStreetsServiceProvider'" when i run "$ php artisan vendor:publish". Any help would be appreciated.`


Solution

  • Change in step 2 of the above link worked for me:

    change this:

    'providers' => array( 
       ... 
      'FireEngineRed\SmartyStreetsLaravel\SmartyStreetsServiceProvider', 
    ) 
    'aliases' => array(
     ... 
    'SmartyStreets' => 'FireEngineRed\SmartyStreetsLaravel\SmartyStreetsFacade',
     ) 
    

    to this:

    'providers' => [ 
       ...
       FireEngineRed\SmartyStreetsLaravel\SmartyStreetsServiceProvider::class,
     ],
    'aliases' => [ 
     ...
     'SmartyStreets'  = > FireEngineRed\SmartyStreetsLaravel\SmartyStreetsFacade::class,
     ],
    

    Note:Add the SmartyStreets providers and aliases element at the end of the both array.