vendredi 15 février 2019

Create table based on the data value of another table in Laravel

I try to create a new table based on the existing table. If the table value in A = 'TC' or '0', the table value in B will be '0', else the table value in B will follow the table value in A.

This is what I have tried, but I'm not sure about the logic that I code. Hopefully, someone will help me.

$subject = Scsj::get();
    if ($subject->teknologi_dan_sistem_maklumat=='TC'||'0') {
        $subject->teknologi_dan_sistem_maklumat=='0';
    } else {
        $subject->teknologi_dan_sistem_maklumat=='1';
    }



from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2SVg4GK
via IFTTT

Aucun commentaire:

Enregistrer un commentaire