0

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.`

A_S
  • 127
  • 7
  • 3
    I'm not sure how that package works, but I would recommend trying the offical PHP sdk if you haven't already https://packagist.org/packages/smartystreets/phpsdk – camiblanch Apr 24 '19 at 20:18

1 Answers1

1

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.

A_S
  • 127
  • 7