/** * creating records */ Route::get('create_data', function () { /******************************************************************************************************************* * client insert(s) *******************************************************************************************************************/ if (is_null($client = Client::checkIfExists('Kendra Scott'))) { $client = new Client(); $client->name = 'Kendra Scott'; $client->save(); } /******************************************************************************************************************* * project insert(s) ******************************************************************************************************************/ if (is_null($project = Project::checkIfExists('Magento Development'))) { // get $client->id $client = Client::where('name', '=', 'Kendra Scott')->first(); $project = new Project(); $project->name = 'Magento Development'; $project->client_id = $client->id; $project->flag_recording_time_for = true; $project->save(); } /******************************************************************************************************************* * work_type insert(s) * - Defect * - Feature * - Atlassian Ticket ******************************************************************************************************************/ $type = 'Atlassian Ticket';