/** * @test */ public function it_has_a_statically_callable_table_name() { $tableName = App\Models\PrintingLogSheet::table(); $this->assertEquals('printing_log_sheets', $tableName); }
/** * Collection of jobs started in this department in current shift * @return Collection */ public function currentShiftJobsStarted() { $jobsStartedIds = DB::table(PrintingLogSheet::table())->select('job_id_fk')->groupBy('job_id_fk')->havingRaw('min(created_at) >= \'' . $this->current_shift->starting_time . '\'')->havingRaw('min(created_at) <= \'' . $this->current_shift->ending_time . '\'')->pluck('job_id_fk'); return JobCard::find($jobsStartedIds); }