Example #1
0
 /**
  * Bind data to the view.
  *
  * @param  View  $view
  * @return void
  */
 public function compose(View $view)
 {
     $view->with('select_failure_mode', ['Assembly', 'Environment', 'Machine', 'Man', 'Material', 'Method / Process']);
     $view->with('customers', Option::orderBy('customer')->select('customer')->get());
     $view->with('machines', Machine::orderBy('name')->select('name')->get());
     $view->with('stations', Station::select('station')->get());
     $view->with('employees', Employee::orderBy('name')->select('name')->where('name', '<>', Auth::user()->employee->name)->get());
 }
Example #2
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Option::where('id', '<>', 'null')->delete();
     Machine::where('id', '<>', 'null')->delete();
     Station::where('id', '<>', 'null')->delete();
     $faker = \Faker\Factory::create();
     Option::create(['customer' => 'adgt']);
     Option::create(['customer' => 'ams']);
     Option::create(['customer' => 'cml']);
     Option::create(['customer' => 'maxim']);
     Option::create(['customer' => 'microchip']);
     Machine::create(['name' => 'at01']);
     Machine::create(['name' => 'at02']);
     Machine::create(['name' => 'at03']);
     Machine::create(['name' => 'at04']);
     Machine::create(['name' => 'at05']);
     Station::create(['station' => 'pl1']);
     Station::create(['station' => 'pl2']);
     Station::create(['station' => 'pl3']);
     Station::create(['station' => 'pl4']);
     Station::create(['station' => 'pl5']);
 }
Example #3
0
 /**
  * @param $name
  */
 public function delete($name)
 {
     Machine::whereName($name)->delete();
 }
Example #4
0
 public function create()
 {
     JavaScript::put(['customers' => Option::option(), 'machines' => Machine::option(), 'stations' => Station::option(), 'employees' => Employee::option(), 'discrepancies' => Discrepancy::option()]);
     return view('report.issue');
 }