小编pra*_*rel的帖子

ProviderRepository.php第208行中的FatalErrorException:未找到类'Illuminate\Html\HtmlServiceProvider'

我只是通过作曲家需要laravelcollective/html在laravel上安装Html包然后我运行我的代码但它不成功,然后我添加

'Html' => Illuminate\Html\HtmlFacade::class,
'Form' => Illuminate\Html\FormFacade::class,
Run Code Online (Sandbox Code Playgroud)

 Illuminate\Html\HtmlServiceProvider::class,
Run Code Online (Sandbox Code Playgroud)

app.php

然后我又跑了

 FatalErrorException in ProviderRepository.php line 208:
 Class 'Illuminate\Html\HtmlServiceProvider' not found
Run Code Online (Sandbox Code Playgroud)

php laravel-5.4

7
推荐指数
1
解决办法
2万
查看次数

类UsersTableSeeders不存在[ReflectionException]

    <?php
use Illuminate\Database\Seeder;
use App\User;

class UsersTableSeeders extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
       User::create([
                'name'=>'prakash',
                'username'=>'prakash',
                'email'=>'rockpokhrel@gmail.com',
                'password'=> bycrypt('pokhrel'),
                'remember_token'=> str_random(10),
            ]);
    }
}
Run Code Online (Sandbox Code Playgroud)

我不明白为什么我收到此错误:[ReflectionException]类UsersTableSeeders不存在

php laravel-5.4

4
推荐指数
1
解决办法
4428
查看次数

函数mcrypt_create_iv()在CodeIgniter框架中已弃用

<?php 
class Encryption {
    var $skey     = "1234561234561234"; // you can change it

    public  function safe_b64encode($string) {

        $data = base64_encode($string);
        $data = str_replace(array('+','/','='),array('-','_',''),$data);
        return $data;
    }

    public function safe_b64decode($string) {
        $data = str_replace(array('-','_'),array('+','/'),$string);
        $mod4 = strlen($data) % 4;
        if ($mod4) {
            $data .= substr('====', $mod4);
        }
        return base64_decode($data);
    }

    public  function encode($value){ 

        if(!$value){return false;}
        $text = $value;
        $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
        $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
        $crypttext = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $this->skey, $text, MCRYPT_MODE_ECB, $iv);
        return trim($this->safe_b64encode($crypttext)); 
    }

    public function decode($value){

        if(!$value){return false;} …
Run Code Online (Sandbox Code Playgroud)

php codeigniter php-7.1

3
推荐指数
1
解决办法
2万
查看次数

SQLSTATE [42S01]:基本表或视图已存在或基本表或视图已存在:1050表

这是我的迁移表

    <?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserTable extends Migration
{

    public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('role_id')->unsigned();
            $table->string('name');
            $table->string('email',50)->unique();
            $table->string('username');
            $table->string('password');
            $table->boolean('active');
            $table->rememberToken();
            $table->timestamps();

        });
    }

    public function down()
    {
        Schema::dropIfExists('users');
    }
}
Run Code Online (Sandbox Code Playgroud)

每当我尝试迁移时,都会发生以下错误

* [Illuminate \ Database \ QueryException] SQLSTATE [42S01]:基本表或视图已经存在:1050表'user'确实存在(SQL:创建表usersidint unsigned not null auto_increment主键,role_idint unsigned not null,namevarchar( 191)不为空,emailvarchar(50)不为空,usernamevarchar(191)不为空,pas swordvarchar(191)不为空,activetinyint(1)不为空,remember_token varchar(100)为空,created_at时间戳为null,updated_at时间戳为nu …

php laravel-5.4

2
推荐指数
1
解决办法
7491
查看次数

标签 统计

php ×4

laravel-5.4 ×3

codeigniter ×1

php-7.1 ×1