I currently have this laravel code
$theCompany = App\bought::find($company->theName);
QueryException in Connection.php line 713:
If you use the "find" method of your model, it will search using the "id" field by default. However if you want to search for other column, you can use the "where" method:
For further information you can check this link.