How to save boolean values in laravel eloquent : <p>I have made the following migration in Laravel:</p>

<pre><code>&lt;?php

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

class QualityCheckTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('quality_check', function (Blueprint $table) {
            $table-&gt;increments('id');
            $table-&gt;boolean('favicon');
            $table-&gt;boolean('title');
            $table-&gt;boolean('image-optimization');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('quality_check');
    }
}
</code></pre>

<p>I have the following controller method that runs when the form in the frontEnd is submitted:</p>

<pre><code>public function store(CreateArticleRequest $request) {
        // $input = Request::all();
        Article::create($request-&gt;all());
        return redirect('articles');
    }
</code></pre>

<p>My form looks like , so:</p>

<pre><code>{!! Form::open([ 'action' =&gt; 'QualityCheckController@validateSave' , 'class'=&gt;'quality-check-form' , 'method' =&gt; 'POST' ]) !!}

        &lt;div class="input-wrpr"&gt;
            {!! Form::label('favicon', 'Favicon') !!}
            {!! Form::checkbox('favicon', 'value' ); !!}
        &lt;/div&gt;

        &lt;div class="input-wrpr"&gt;
            {!! Form::label('title', 'Page Title') !!}
            {!! Form::checkbox('title', 'value'); !!}
        &lt;/div&gt;

        &lt;div class="input-wrpr"&gt;
            {!! Form::label('image-optimization', 'Image Optimization') !!}
            {!! Form::checkbox('image-optimization', 'value'); !!}
        &lt;/div&gt;

        {!!  Form::submit('Click Me!') !!}

    {!! Form::close() !!}
</code></pre>

<p>So when the method runs the values of the checkboxes are saved to the database.</p>

<p>As of now , all entries are showing as <code>0</code> , Like so:</p>

<p><a href="https://i.stack.imgur.com/HmaM7.png" rel="noreferrer"><img src="https://i.stack.imgur.com/HmaM7.png" alt="enter image description here"></a></p>

<p>Now how to make it such that when the checkbox is checked , <code>1</code> is saved and when the checkbox is left unchecked the value in is left at <code>0</code> ??</p>
