相关疑难解决方法(0)

PHP artisan迁移不创建新表

我是新手Laravel,我正在关注Laravel Documentations以及一些教程视频.但是,我php artisan migrate在我的本地运行此代码,CMD prompt而不是Database Table在创建phpmyadmin.还有其他几个与此相关的类似主题,stackoverflow但没有解决我的问题.请不要标记此副本.

好的,就是这样.我运行这段代码

php artisan make:migration create_student_table --create=student
Run Code Online (Sandbox Code Playgroud)

并在迁移文件夹中创建新文件 2016_04_08_061507_create_student_table.php

然后在那个文件中我运行它 code

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

    class CreateStudentTable extends Migration
    {
        /**
         * Run the migrations.
         *
         * @return void
         */
        public function up()
        {
            Schema::create('student', function (Blueprint $table) {
                $table->increments('id');
                $table->timestamps();
                $table->string('name', 20); 
                $table->string('email', 255);
            });
        }

        /**
         * Reverse the migrations.
         *
         * @return void
         */
        public function down()
        { …
Run Code Online (Sandbox Code Playgroud)

php laravel artisan artisan-migrate

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

Laravel 5.5社交网站集成显示错误formatRedirectUrl()必须是类型数组,null给定

我正在使用"laravel/socialite":"^ 3.0",登录facebook.但它显示错误

类型错误:传递给Laravel\Socialite\SocialiteManager :: formatRedirectUrl()的参数1必须是数组类型,给定null,在/var/www/html/mas/vendor/laravel/socialite/src/SocialiteManager.php中调用.

当我在登录控制器中调用以下函数时会发生这种情况

public function socialLogin($social)
{
    return Socialite::driver($social)->redirect();
}
Run Code Online (Sandbox Code Playgroud)

laravel-5 laravel-socialite

5
推荐指数
2
解决办法
8649
查看次数

从laravel 5中的控制器运行composer dump-autoload

我想composer dump-autoload在控制器中运行没有shell命令.
在laravel 4中我使用Artisan::call('dump-autoload');
但是在laravel 5中这个命令不起作用.

php laravel composer-php laravel-5 laravel-5.2

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