I get this error (when I try to subscribe to a monthly newsletter)
Class 'App\NewsLetterManager' not found
When I have this website running locally (on vagrant) it all works fine, but when I transfer my project to the online server I get the error above.
In my Controller I DO use the NewsLetterManager.. So no idea what is going on.
Controller (snippet)
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\NewsLetterManager;
class HomeController extends Controller
{
..
public function addToMailingList(Request $request)
{
$this->validate($request, [
'email' => 'required|email|max:195'
]);
$newsLetterManager = new NewsLetterManager($mailchimp = app('Mailchimp'));
$newsLetterManager->addEmailToList($request->email);
return Redirect::to('/')->with('message', 'mailing');
}
..
}
Blade
<form method="post" action="">
<input type="hidden" name="_token" value="">
<input class="bordered-input" type="email" name="email" placeholder="Subscribe here" />
</form>
Routes
Route::post('/mailing/add', ['as' => 'mailing.add', 'uses' => 'Controller@addToMailingList']);
Thanks guys
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1rz8b8M
via IFTTT
Aucun commentaire:
Enregistrer un commentaire