Tuesday, March 14, 2017

LARAVEL - Button changes a boolean value in DB

when i click the success button i have to change 'confirmação' value to 1.

Is that possible? I have to create a form to do this?

 Schema::create('visitas', function (Blueprint $table) {
            $table->increments('id');
            $table->date('data');
            $table->time('hora');
            $table->boolean('confirmacao')->default(0);
            $table->integer('imovel_id');
            $table->integer('client_id');
            $table->timestamps();

Example



via D. Lopes

Advertisement