Open diazdennis opened 11 months ago
Hi Kevin, You can use firstOrCreat function for it like this.
$record = FlowSavedPath::firstOrCreate( ['flow_name' => $fileName], [ 'path' => "https://auto.notifire-api.com/uploads/{$group_id}/{$fileName}.json", 'group_id' => $group_id, ] );
Great! Thanks for your help!
This is auto flow chat which show whatsapp auto reply. I have to export into Json and if data is not exist, it should be added in DB.
public function exportJson(Request $request) { $group_id =auth()->user()->id; // Get authenticated user group_id $fileName = $request['exportJsonName'];