Exemplo n.º 1
0
 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(Request $request, $id)
 {
     //
     $data = $request->except(['_token', '_method']);
     $cdma = Cdma::find($id);
     $cdma->update($data);
     return redirect()->to('cdmas');
 }
Exemplo n.º 2
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     //
     $faker = \Faker\Factory::create();
     Cdma::truncate();
     foreach (range(1, 10000) as $index) {
         Cdma::create(['employee_number' => $faker->numberBetween(100000, 400000), 'employee_name' => $faker->name, 'phone_number' => $faker->phoneNumber, 'department_name' => $faker->company, 'company_id' => 2, 'status_id' => 1]);
     }
 }
Exemplo n.º 3
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     //
     $cdmas = Cdma::all();
     return view('cdma.manager.index', compact('cdmas'));
 }
Exemplo n.º 4
0
 public function cdma($id)
 {
     Cdma::find($id)->delete();
     return back();
 }