Support the ongoing development of Laravel.io →
Eloquent Packages Testing

Hi, I'm using the Sentry package how can manage this setup

public function setUpDb()
    {
        Artisan::call('migrate');
    }

to run

php artisan migrate --package=cartalyst/sentry

I don't want to put the sentry migrate in my database/migrations In my database migration I've got

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

class AddFieldsUsers extends Migration {

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up() 
    {
        Schema::table('users', function(Blueprint $table)
        {
            /* TODO unittest */
            $table->string('fullname');
            $table->string('username')->unique();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down() 
    {
        Schema::table('users', function(Blueprint $table) 
        {
            $table->dropColumn(array('fullname', 'username'));
        });
    }

}
Last updated 3 years ago.
0

Artisan::call('migrate', array('--package'=>'cartalyst/sentry'));

Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

whisher whisher Joined 9 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.