Woah @Bilalfarhat24 ...
How to compare the values of two columns of two different table?
return $tableOne->columnName == $tableTwo->columnName ? 'yes' : 'no';
For Example: If the table, Person detail has "Bank Challan No" column and Bank Detail also has "Bank Challan No" column.... when user submit the form, Challan No save into the Person detail table, and system will generate the Challan form for User to submit fees in bank.
if (Bank::where('challanNo', '=', Input::get('challanNo'))->exists()) {
// the record was found so do whatever here
// submit the fees etc
}
After user submit the fees into bank, Bank will send the daily transaction details to the System Admin.
This is not comparing two values in the database. Look into Events
System Admin will enter the "Challan No" into BankChallan No of Bank Detail Column.
You need to set up a relationship between a Person and a Bank based on the foreign key of 'Bank Challan No'. See Relationships
Then I want to show all Person Details who have submitted the fees by comparing "Bank Challan No" of Person Detail and "Bank Challan No" of Bank Detail . And everyone can see this list.... How i can do this??
Let's get a few things straight. Please slow down and split up your question (as I have) into the relevant, smaller parts. Don't run before you can walk. What have you tried so far?