Example #1
0
 protected function setTreatment(Request $request)
 {
     if ($request->isMethod('post')) {
         $data = $request->input();
         $treatment = Treatment::create(['organization_id' => $data['organization_id'], 'user_id' => $data['user_id'], 'therapist_id' => $data['therapist_id'], 'description' => $data['description']]);
         return json_encode(array('message' => 'ok'));
     }
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Treatment::create(['name' => 'Roller Shades', 'description' => 'A simple and elegant way to cover your windows. Both practical and stylish, roller shades are available in over 200 exclusive materials.']);
     Treatment::create(['name' => 'Solar Shades', 'description' => 'Glare reduction and UV protection. Choose solar shades to make the sun a little more manageable. 80 eco-friendly materials available.']);
 }