找不到Laravel Cartalyst/条带方法 [英] Laravel Cartalyst/Stripe Method Not Found

查看:40
本文介绍了找不到Laravel Cartalyst/条带方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Cartalyst/Stripe( https://cartalyst.com/manual/stripe/2.0 )在我的Laravel应用程序中,但我没有找到该方法(因为缺少更好的词).

I am trying to use Cartalyst/Stripe (https://cartalyst.com/manual/stripe/2.0) in my Laravel application but I the method's aren't being found (for a lack of a better word).

这是我的控制人:

namespace App\Http\Controllers;

use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use Cartalyst\Stripe\Stripe;

class AdminController extends Controller
{

    public function __construct()
    {
        $this->middleware('auth');
    }

    public function create_user(Request $request) {

        $stripe = Stripe::make( config('services.stripe.key') );

        $customer = $stripe->customers()->create([
            'email' => 'email@example.com',
        ]);


        return response()->json(['response' => 'This is get method']);
    }
}

Stripe:make()似乎正常工作,但是在我的IDE中找不到客户->(),并产生内部500错误.我按照 https://cartalyst.com/manual/stripe-laravel/8上的说明进行操作.x ,因此我的提供者和别名与列出的相同.

The Stripe:make() appears to be working correctly, but the customers->() isn't found in my IDE, and produces an internal 500 error. I followed the instructions on https://cartalyst.com/manual/stripe-laravel/8.x so my provider and alias are the same that are listed.

推荐答案

好的,所以我的设置方法实际上可以正常工作,只是我的IDE(phpstorm)无法正确跟踪这些方法.

Alright so the way I have it setup does, in fact, work properly, just my IDE (phpstorm) isn't tracking the methods properly.

这篇关于找不到Laravel Cartalyst/条带方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆