It's Carbon\Carbon. The second Carbon is also a capital first letter.
Class 'Carbon\carbon' not found in web.php
Hi, I'm working with Laravel 5.4 and my app works perfectly on my local system. As part of my development, I'm testing how to deploy laravel on shared hosting (though i have read that VPS is recommended). I have followed the steps here
[http://novate.co.uk/deploy-laravel-5-on-shared-hosting-from-heart-internet/]
and looks like I'm almost there but I get the error Class 'Carbon\carbon' not found in web.php
This is the line throwing up the error
<?php
use Carbon\carbon;
Route::get('/', function () {
$today = Carbon::now()->toDateString();
//dd($today);
$prices = App\Price::with('product')->whereDate('date', $today)->get();
return view('welcome', compact('prices'));
});
What am I doing wrong?
@Robert-Jan Thanks, I will make that correction. However I got it to work by renaming the config.php file in bootstrap/cache/ path. Based on what I read from another thread, it looks like the route path on my local server were cached. I would love to know it this is the best way to fix this issue though.
Please or to participate in this conversation.