I would like to separate the value that my $assets->property_id displaying... it output 122142 instead of [0] => 122, [1] = 142 and better should be in array format. I wanted to learn how to display this in array so that i can place this to another condition...
$user_id = $id;
$type = "TIC";
$asset = ClientPropertyManagement::where('client_id', '=', $user_id)->get();
foreach( $asset as $assets ) {
if ( $assets->investment_type == $type ) {
echo $property = $assets->property_id;
}
}
Im using Laravel 4.2 to display some multiple tables and some conditions to match certain values, etc...
Better Explanation:
I have 2 major tables that i need to connect, assets table and property table.
In my laravel controller, i need to determine first the user id of the current user once I get the value, I need to pass it under assets table to match multiple columns like: “client_id”, “investment_type”, and “property_id”.
Once the “client_id” match the “user id”, i need to check if there was “TIC” type under the “investment_type”, and if there’s a match case, i will need to get the “property_id” and pass it to the property table and get “property_mgmt_contact” value and create automated email alert notification.