我是新手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) 我正在使用"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) 我想composer dump-autoload
在控制器中运行没有shell命令.
在laravel 4中我使用Artisan::call('dump-autoload');
但是在laravel 5中这个命令不起作用.