/**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $networks = [['name' => 'viettel'], ['name' => 'vinaphone'], ['name' => 'mobifone']];
     foreach ($networks as $network) {
         Network::create($network);
     }
 }
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     $this->validate($request, ['name' => 'required|min:3']);
     $network = $request->all();
     $network['user_id'] = Auth::user()->id;
     Network::create($network);
     return redirect(route('network.index'));
 }