I don't understand how to access the table name within same class.
class Timesheets extends Model
{
protected $table = "timesheets";
public static function getAllTimesheets() {
//return DB::table("timesheets")->get();
return DB::table("timesheets")
->join('users', 'name', '=', 'users.name')
->select('timesheets.id', 'name', 'timesheets.time_start', 'timesheets.time_end', 'timesheets.time_desc')
->get();
}
}
How can I replace the "timesheets" with the protected Table variable?