【问题标题】:Invalid Argument Exception , Driver [propel] not Supported in Laravel with using Propel ORM无效参数异常,使用 Propel ORM 在 Laravel 中不支持驱动程序 [propel]
【发布时间】:2016-10-07 08:44:16
【问题描述】:

我使用以下链接中给出的说明将 laravel 默认身份验证驱动程序 eloquent 更改为 propel

https://packagist.org/packages/propel/propel-laravel

auth.php

'driver' => 'propel',

'model' => 'MstUser',

MstUser.php

<?php

use Base\MstUser as BaseMstUser;
use Illuminate\Auth\Authenticatable;
use Illuminate\Auth\Passwords\CanResetPassword;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;

/**
 * Skeleton subclass for representing a row from the 'mst_user' table.
 *
 *
 *
 * You should add additional methods to this class to meet the
 * application requirements.  This class will only be generated as
 * long as it does not already exist in the output directory.
 *
 */
class MstUser extends BaseMstUser implements AuthenticatableContract, CanResetPasswordContract
{
    use Authenticatable, CanResetPassword;

    public function getAuthIdentifier()
    {
        return $this->id;
    }
}

但它仍然给我以下错误:

我正在使用 laravel 5。有关此问题的任何帮助将不胜感激。 谢谢你。

【问题讨论】:

  • 你是否添加了:Propel\PropelLaravel\GeneratorServiceProvider::classPropel\PropelLaravel\RuntimeServiceProvider::class 到 config/app.php ?
  • 对不起..我添加了那部分..:)

标签: php laravel propel2


【解决方案1】:

根据你必须添加的捆绑文档:

Propel\PropelLaravel\GeneratorServiceProvider::class,
Propel\PropelLaravel\RuntimeServiceProvider::class,

到:

config/app.php

providers 数组。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-07-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多