You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use App\Services\MailChimp;
use App\Services\SubscriptionManager;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
$this->app->singleton(MailChimp::class, function ($app) {
$component = new MailChimp();
$component->apiKey = config('mailchimp.apiKey');
$component->apiSecret = config('mailchimp.apiSecret');
return $component;
});
$this->app->singleton(SubscriptionManager::class, function ($app) {
$component = new SubscriptionManager();
$component->trialPeriod = config('subscription.trialPeriod');
return $component;
});
}
/**
* Bootstrap any application services.
*/
public function boot(): void
{
//
}
}
please provide me the solution or tell me what mistake i did ? @klimov-paul
The text was updated successfully, but these errors were encountered:
namespace legacy\controllers;
use yii\web\Controller;
class SiteController extends Controller
{
public function actionBlade()
{
return view('welcome');
}
}
Judging the error message \Illuminate\View\ViewServiceProvider service provided has been registered/booted in your case.
i'm using YII2 advance project that have frontend and backend and i use this directory structure
// legacy/frontend/controllers/SiteController.php
namespace frontend\controllers;
use yii\web\Controller;
/**
* Site controller
*/
class SiteController extends Controller
{
public function actionAbout()
{
return view('pages.about');
}
}
// SiteController
i try to inegrate Yii in my laravel project i follow all your steps still it will give me this error
Illuminate\Contracts\Container\BindingResolutionException
Target [Illuminate\Contracts\View\Factory] is not instantiable.
// config/app.php
// app/providers/AppServiceProvider.php
please provide me the solution or tell me what mistake i did ? @klimov-paul
The text was updated successfully, but these errors were encountered: