I am going through a laravel tutorial and the section I am stuck on is called "The Service Container" Basically I just grab a environment variable and spit it out to the page with a dd() die and dump. However I get a class not found
error. I know it must be a small bug, but cant quite figure it out. I tried running composer dump-autoload
with no luck.
Here is my code
routes/web.php
App::bind('App\Billing\Stripe', function(){
return new \App\Billing\Stripe(config('services.stripe.secret'));
});
$stripe = App::make('App\Billing\Stripe');
dd($stripe);
app/billing/Stripe.php
namespace App\Billing;
class Stripe{
protected $key;
public function __construct($key){
$this->key = $key;
}
}
via Anders Kitson