public function rating($id, $user_id)
 {
     $rate = Input::get('rate');
     Rate::create(['user_id' => $user_id, 'product_id' => $id, 'rate' => $rate]);
 }
Пример #2
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Rate::create(['parentable_id' => '', 'parentable_type' => '', 'rate' => 1]);
 }