public function run()
 {
     DB::table('systemics')->delete();
     $collection = [['user_id' => '2', 'event' => 'User jongravois@gmail.com logged in to system.']];
     foreach ($collection as $record) {
         Systemic::create($record);
     }
 }
Example #2
0
function logIt($msg)
{
    if (!Auth::check()) {
        //TODO: Handle Exception
    }
    $user = Auth::user();
    $ins = ['user_id' => $user->id, 'event' => 'User ' . $user->email . ' ' . $msg];
    Systemic::create($ins);
    return true;
}
 public function update($id)
 {
     // save updated
     $record = $this->records->find($id);
     if (!$record) {
         Systemic::create(Input::all());
         return $this->respond($record);
     }
     $record->fill(Input::all())->save();
     return $this->respond($record);
 }