//Route::resource('zzbob', 'TimeCardController'); /******************************************************************************************************************* * below routes are for development purposes. *******************************************************************************************************************/ Route::get('delete_data', function () { \Artisan::call('migrate:refresh'); return; }); /** * 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();